Need to modify AuthnContextClassRef in ExternalAuth

Cantor, Scott cantor.2 at osu.edu
Fri Dec 18 13:37:11 EST 2015


On 12/18/15, 1:10 PM, "users on behalf of Stefan Santesson" <users-bounces at shibboleth.net on behalf of stefan at aaa-sec.com> wrote:



>I suppose this is done in external-auth-config.xml
>
>Would this work?
>
><util:constant id="shibboleth.authn.External.addDefaultPrincipals" static-field="java.lang.Boolean.FALSE" />

Yes.

>This is what I currently do:
>
>Principal principal = new UsernamePrincipal(principalName);
>            Subject subj = new Subject();
>            subj.getPrincipals().add(principal);
>
>            request.setAttribute(ReturnAttr.principalName.name(), principalName);
>            request.setAttribute(ReturnAttr.principal.name(), principal);
>            request.setAttribute(ReturnAttr.subject.name(), subj);

I believe the documentation is very explicit about that being wrong. You must pick one, in this case that one being returning a Subject.

>How do I add the selected AuthnContextClassRef URI?

Add an object of type AuthnContextClassRefPrincipal with the value you want to the Subject's principal collection.

-- Scott

>


More information about the users mailing list