SubjectDerivedAttribute problem
Cantor, Scott
cantor.2 at osu.edu
Mon Apr 24 09:43:39 EDT 2017
> But it still doen't work. I think the problem could by in
> "principalAttributeName". Am I setting it correctly?
No.
> If no, how to do it correctly?
You have to wrap the value in an IdPAttribute and then in an IdPAttributePrincipal inside the Subject you return. That's what the SubjectDerivedAttribute's default behavior it, it pulls data from IdPAttributePrincipals.
> request.setAttribute(ExternalAuthentication.PRINCIPAL_NAME_KEY
> , username);
You cannot use that if you want to control the content of the Subject returned, you have to return the whole Subject, created by you, to your specifications.
> request.setAttribute("signedPrincipalName", signedPrincipalName);
That does nothing. That is not part of the interface from the External method.
-- Scott
More information about the users
mailing list