CAS 5
Handler:
@Override
protected HandlerResult doAuthentication(Credential credential) throws
GeneralSecurityException, PreventedException {
final Map<String, Object> attributeMap =
fillAttributes((UsernamePasswordCredential) credential);
attributeMap.put("name", "Test attribute value");
final List<MessageDescriptor> list = new ArrayList<>();
return createHandlerResult(credential,
this.principalFactory.createPrincipal(((UsernamePasswordCredential)
credential).getPersonalCode(),
attributeMap),
list);
Service:
"scopes": [
"java.util.HashSet", [ "openid", "profile" ]
],
"attributeReleasePolicy": {
"@class": "org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy",
"allowedAttributes" : [ "java.util.ArrayList", [ "name" ] ]
}
OAuth20UserProfileControllerController (profile request):
accessToken.getAuthentication().getPrincipal();
principal.getAttributes()
Principal = instanceOf SimplePrincipal, but previously added attribute is not
there.
Trying to debug through the code to understand how it actually works, but no
luck till now.
--
- 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/650cd293-5b38-4292-9d7f-016f67cdad20%40apereo.org.