Napolean,
When you say 'returns with one level', do you mean that only one value of the
multivalued attrtibute is returned or that the attribute identifier if repeated
once for each value?
Enable this logger to see what cas is finding:
<!-- DEBUG Found principal attributes [...] for [username]
Attribute policy [???] allows release of [...] for [username]
Final collection of attributes allowed are: [...] -->
<AsyncLogger
name="org.apereo.cas.services.AbstractRegisteredServiceAttributeReleasePolicy"
level="debug"/>
Ray
On Sun, 2020-11-08 at 19:22 -0800, Napoleon Ponaparte wrote:
Notice: This message was sent from outside the University of Victoria email
system. Please be cautious with links and sensitive information.
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
[X]
3. My register user
[X]
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.
--
Ray Bon
Programmer Analyst
Development Services, University Systems
2507218831 | CLE 019 | [email protected]<mailto:[email protected]>
I respectfully acknowledge that my place of work is located within the
ancestral, traditional and unceded territory of the Songhees, Esquimalt and
WSÁNEĆ Nations.
--
- 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/371468c7b810fa97ae6bbaf88708adbfc4baf395.camel%40uvic.ca.