getPrincipals() typing

Klingenstein, Nate nklingenstein at calstate.edu
Wed Aug 31 18:16:59 EDT 2016


I appreciate that this is going to partially get obfuscated and then replaced, but reading the MultiFactorAuthnConfiguration examples, there's still crosstalk that's basically the same.

I'm still trying to understand how Webflow and Java Principals/Subjects work(and omfg overgeneralized ghosts) for my own edification and getting close.

I filched from the unit test:

idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAPTest

I would rather not hardcode principal types into this.  I get null if I don't specify a principal type.

result.getSubject().getPrincipals().iterator().next().getName();

If I do specify a type, it works.

<evaluate expression="authenticationContext.getAuthenticationResult().getSubject().getPrincipals(T(net.shibboleth.idp.authn.principal.UsernamePrincipal)).iterator().next().getName()" result="flowScope.usernameprincipal" />


More information about the dev mailing list