[java-identity-provider COMMIT] /trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIden...

noreply at shibboleth.net noreply at shibboleth.net
Thu May 1 21:22:48 EDT 2014


Author: scantor
Date: Thu May  1 21:22:47 2014
New Revision: 5822

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5822&view=rev
Log:
Move predicate inside NameID generators to simplify service abstraction.

Modified:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java?rev=5822&r1=5821&r2=5822&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/nameid/impl/LegacyNameIdentifierGenerator.java Thu May  1 21:22:47 2014
@@ -109,12 +109,6 @@
         attributeContextLookupStrategy = Constraint.isNotNull(strategy,
                 "AttributeContext lookup strategy cannot be null");
     }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean apply(@Nullable final ProfileRequestContext input) {
-        return activationCondition.apply(input);
-    }
     
     /** {@inheritDoc} */
     @Override
@@ -122,6 +116,10 @@
             @Nonnull @NotEmpty final String format) throws SAMLException {
         ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
         Constraint.isNotNull(format, "Format cannot be null or empty");
+        
+        if (!activationCondition.apply(profileRequestContext)) {
+            return null;
+        }
         
         final AttributeContext attributeContext = attributeContextLookupStrategy.apply(profileRequestContext);
         if (attributeContext == null || attributeContext.getIdPAttributes().isEmpty()) {



More information about the commits mailing list