Bump question
W dniu środa, 24 lipca 2019 11:26:24 UTC+2 użytkownik first_step_with_CAS
napisał:
>
> Why OAuth user profile return fields as arrays?
> {
> "number":[
> "1234"
> ],
> "fullname": [
> "John Smith"
> ],
> "email":[
> "[email protected]"
> ],
> "sso_id":[
> "5d0364ef4fd1c900075487f0"
> ],
> "service":"https://url.com/redirect",
> "id":"[email protected]",
> "client_id":"secret"
> }
>
> I want to response without arrays:
>
> {
> "number": "1234",
> "fullname": "John Smith",
> "email": "[email protected]",
> "sso_id": "5d0364ef4fd1c900075487f0",
> "service":"https://url.com/redirect",
> "id":"[email protected]",
> "client_id":"secret"
> }
>
> I tested this on CAS 6.1.0.RC5 and 6.0.4 version.
> I used MongoDb, in Mongo all fields have proper types.
>
> *cas.properties*
> cas.authn.mongo.attributes=number,id,email,fullname
> cas.authn.oauth.userProfileViewType=FLAT
> ...
>
> *Service configuration*
> {
> "@class" :
> "org.apereo.cas.support.oauth.services.OAuthRegisteredService",
> "clientId": "clientid",
> "clientSecret": "clientsecret",
> "serviceId" : ".*example.com/.*",
> "name" : "ClientName",
> "id" : 1000,
> "bypassApprovalPrompt": true,
> "generateRefreshToken": true,
> "supportedGrantTypes": [ "java.util.HashSet", [ "authorization_code" ] ],
> "supportedResponseTypes": [ "java.util.HashSet", [ "code" ] ],
> "attributeReleasePolicy" : {
> "@class" : "org.apereo.cas.services.ReturnAllAttributeReleasePolicy"
> },
> "scopes": [ "java.util.HashSet", ["profile"]]
> }
>
>
>
--
- 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/6db00b1c-5bd5-49cb-8988-be2edf025b90%40apereo.org.