[java-identity-provider COMMIT] /trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml
noreply at shibboleth.net
noreply at shibboleth.net
Tue Jan 24 10:23:10 EST 2017
Author: scantor
Date: Tue Jan 24 10:23:10 2017
New Revision: 8602
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8602&view=rev
Log:
Correct the example script to get the username appropriately.
Modified:
trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml
Modified: trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml?rev=8602&r1=8601&r2=8602&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml (original)
+++ trunk/idp-conf/src/main/resources/conf/authn/mfa-authn-config.xml Tue Jan 24 10:23:10 2017
@@ -70,8 +70,13 @@
// Attribute check is required to decide if first factor alone is enough.
resCtx = input.getSubcontext(
"net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext", true);
- resCtx.setPrincipal(input.getSubcontext(
- "net.shibboleth.idp.authn.context.SubjectCanonicalizationContext").getPrincipalName());
+
+ // Look up the username using a standard function.
+ usernameLookupStrategyClass
+ = Java.type("net.shibboleth.idp.session.context.navigate.CanonicalUsernameLookupStrategy");
+ usernameLookupStrategy = new usernameLookupStrategyClass();
+ resCtx.setPrincipal(usernameLookupStrategy.apply(input));
+
resCtx.getRequestedIdPAttributeNames().add("allowedLoginMethods");
resCtx.resolveAttributes(custom);
More information about the commits
mailing list