[java-identity-provider COMMIT] in /trunk/idp-saml-impl/src: main/java/net/shibboleth/idp/saml/impl/profile/config/na...

noreply at shibboleth.net noreply at shibboleth.net
Wed Mar 5 00:09:28 EST 2014


Author: scantor
Date: Wed Mar  5 00:09:27 2014
New Revision: 5525

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5525&view=rev
Log:
Expanded use of strategies in statement builders.

Added:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/config/navigate/SessionLifetimeLookupFunction.java   (with props)
Modified:
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAuthenticationStatementToAssertion.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertion.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAuthenticationStatementToAssertionTest.java
    trunk/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/impl/profile/saml2/AddAuthnStatementToAssertionTest.java

Modified: trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAuthenticationStatementToAssertion.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAuthenticationStatementToAssertion.java?rev=5525&r1=5524&r2=5525&view=diff
==============================================================================
--- trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAuthenticationStatementToAssertion.java (original)
+++ trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml1/AddAuthenticationStatementToAssertion.java Wed Mar  5 00:09:27 2014
@@ -27,8 +27,6 @@
 import net.shibboleth.idp.authn.context.AuthenticationContext;
 import net.shibboleth.idp.authn.context.RequestedPrincipalContext;
 import net.shibboleth.idp.authn.principal.DefaultPrincipalDeterminationStrategy;
-import net.shibboleth.idp.profile.IdPEventIds;
-import net.shibboleth.idp.profile.context.RelyingPartyContext;
 
 import org.opensaml.profile.action.ActionSupport;
 import org.opensaml.profile.action.EventIds;
@@ -36,13 +34,16 @@
 import org.opensaml.profile.context.navigate.OutboundMessageContextLookup;
 
 import net.shibboleth.idp.saml.authn.principal.AuthenticationMethodPrincipal;
+import net.shibboleth.idp.saml.impl.profile.config.navigate.IdentifierGenerationStrategyLookupFunction;
+import net.shibboleth.idp.saml.impl.profile.config.navigate.ResponderIdLookupFunction;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy;
 
 import org.joda.time.DateTime;
 import org.opensaml.core.xml.XMLObjectBuilderFactory;
 import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
-import org.opensaml.messaging.context.navigate.ChildContextLookup;
 import org.opensaml.messaging.context.navigate.MessageLookup;
 import org.opensaml.saml.common.SAMLObjectBuilder;
 import org.opensaml.saml.saml1.core.Assertion;
@@ -73,9 +74,8 @@
  * or defaulted function that obtains an {@link AuthenticationMethodPrincipal} from the profile context.</p>
  * 
  * @event {@link EventIds#PROCEED_EVENT_ID}
+ * @event {@link EventIds#INVALID_PROFILE_CTX}
  * @event {@link EventIds#INVALID_MSG_CTX}
- * @event {@link IdPEventIds#INVALID_RELYING_PARTY_CTX}
- * @event {@link IdPEventIds#INVALID_PROFILE_CONFIG}
  * @event {@link AuthnEventIds#INVALID_AUTHN_CTX}
  */
 public class AddAuthenticationStatementToAssertion extends AbstractAuthenticationAction {
@@ -89,33 +89,38 @@
      */
     private boolean statementInOwnAssertion;
 
-    /**
-     * Strategy used to locate the {@link RelyingPartyContext} associated with a given {@link ProfileRequestContext}.
-     */
-    @Nonnull private Function<ProfileRequestContext, RelyingPartyContext> relyingPartyContextLookupStrategy;
-
     /** Strategy used to locate the {@link Response} to operate on. */
     @Nonnull private Function<ProfileRequestContext, Response> responseLookupStrategy;
 
+    /** Strategy used to locate the {@link IdentifierGenerationStrategy} to use. */
+    @NonnullAfterInit private Function<ProfileRequestContext,IdentifierGenerationStrategy> idGeneratorLookupStrategy;
+
+    /** Strategy used to obtain the assertion issuer value. */
+    @Nullable private Function<ProfileRequestContext,String> issuerLookupStrategy;
+    
     /** Strategy used to determine the AuthenticationMethod attribute. */
     @Nonnull private Function<ProfileRequestContext, AuthenticationMethodPrincipal> methodLookupStrategy;
-        
-    /** RelyingPartyContext to access. */
-    @Nullable private RelyingPartyContext relyingPartyCtx;
-
+
+    /** The generator to use. */
+    @Nullable private IdentifierGenerationStrategy idGenerator;
+    
     /** AuthenticationResult basis of statement. */
     @Nullable private AuthenticationResult authenticationResult;
     
     /** Response to modify. */
     @Nullable private Response response;
+    
+    /** EntityID to populate as assertion issuer. */

[... 396 lines stripped ...]


More information about the commits mailing list