[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src: main/java/net/shibboleth/idp/saml/impl/profile/logic/Def...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Jan 28 13:43:37 EST 2014
Author: scantor
Date: Tue Jan 28 13:43:36 2014
New Revision: 5259
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5259&view=rev
Log:
Unit test and fixes for NameID format strategy function.
Added:
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/logic/
trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/logic/DefaultNameIdentifierFormatStrategyTest.java (with props)
Modified:
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/logic/DefaultNameIdentifierFormatStrategy.java
Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/logic/DefaultNameIdentifierFormatStrategy.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/logic/DefaultNameIdentifierFormatStrategy.java?rev=5259&r1=5258&r2=5259&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/logic/DefaultNameIdentifierFormatStrategy.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/logic/DefaultNameIdentifierFormatStrategy.java Tue Jan 28 13:43:36 2014
@@ -34,6 +34,7 @@
import org.slf4j.LoggerFactory;
import com.google.common.base.Function;
+import com.google.common.collect.Lists;
/**
* Function to return a set of candidate NameIdentifier/NameID Format values derived from an entity's
@@ -71,14 +72,14 @@
/** {@inheritDoc} */
@Override
@Nullable public List<String> apply(@Nullable final ProfileRequestContext input) {
- List<String> fromConfig = null;
+ List<String> fromConfig = Lists.newArrayList();
final List<String> fromMetadata = super.apply(input);
final RelyingPartyContext relyingPartyCtx = relyingPartyContextLookupStrategy.apply(input);
if (relyingPartyCtx != null) {
final ProfileConfiguration profileConfig = relyingPartyCtx.getProfileConfig();
if (profileConfig != null && profileConfig instanceof AuthenticationProfileConfiguration) {
- fromConfig = ((AuthenticationProfileConfiguration) profileConfig).getNameIDFormatPrecedence();
+ fromConfig.addAll(((AuthenticationProfileConfiguration) profileConfig).getNameIDFormatPrecedence());
log.debug("Configuration specifies the following formats: {}", fromConfig);
} else {
log.debug("No ProfileConfiguraton available (or not an AuthenticationProfileConfiguration)");
More information about the commits
mailing list