Hi
I am using CAS Overlay Template version 6.2.x.
I have configured my Oauth 2.0 service like bellow:

1. My Oauth2.0 service config

{

    "@class" : 
"org.apereo.cas.support.oauth.services.OAuthRegisteredService",

    "clientId": "xxxx",

    "clientSecret": "xxx",

    "generateRefreshToken" : true,

    "jsonFormat" : true,

    "supported_grants" : ["password", "refresh_token"],

    "serviceId" : "^https://xxxxx/.*";,

    "name" : "OAuthJWTService",

    "id" : 3,

    "jwtAccessToken": true,

    "attributeReleasePolicy" : {

    "@class" : 
"org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy",

    "allowedAttributes" : [ "java.util.ArrayList", 
["comdepartment","comid","lastname","usercode","userdate","useremail","userparentid","userstatus","usertel","usertype","userid"
 
] ]

     },

    "properties" : {

      .....

}

2. My CAS authentication attributes config

3. My register user

With this configuration, when I get Oauth 2.0 JWT token, CAS will return me 
attributes as json with one level. 

Now, how c-an I config my service to get return attributed as JSON 
multi-level?

For example: multi-level in attributes "organization"
{
   "service":"exampleOauthClient",
   "attributes":{
      "data":{
         "comdepartment":"GP2",
         "comid":"VNPTIT2",
         "lastname":" user_anonymous_1 ",
         "usercode":" user_anonymous_1 ",
         "userdate":"09-11-2020",
         "useremail":" [email protected]",
         "userparentid":"VNPTIT2",
         "userstatus":"ACTIVE",
         "usertel":"0907888511",
         "usertype":"USER_COM",
         "userid":"",
         "roles":"",
         "service":"",
         "organization":{
            "organ1":"ACTIVE",
            "organ2":"ACTIVE",
            "organ3":"DISABLE"
         }
      }
   },
   "id":"[email protected]",
   "client_id":"exampleOauthClient"
}

Thank you.



-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/2533c89b-c211-45bc-b201-c666ef7b6f11n%40apereo.org.

Reply via email to