[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractAuthenticatio...

noreply at shibboleth.net noreply at shibboleth.net
Sun Jul 22 16:07:35 EDT 2012


Author: lajoie
Date: Sun Jul 22 16:07:35 2012
New Revision: 4215

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4215&view=rev
Log:
various stages for setting up the authentication request context and filtering potential authentication workflows

Added:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java   (with props)
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/FilterAvailableWorkflowsByPassivity.java   (with props)
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/FilterAvailableWorkflowsByRequestedWorkflows.java   (with props)
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/InitializeAuthenticationContext.java   (with props)
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/SetRequestedAuthenticationWorkflows.java   (with props)
Modified:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractAuthenticationAction.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationRequestContext.java
    trunk/idp-authn-api/src/test/java/net/shibboleth/idp/authn/AuthenticationRequestContextTest.java

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractAuthenticationAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractAuthenticationAction.java?rev=4215&r1=4214&r2=4215&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractAuthenticationAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractAuthenticationAction.java Sun Jul 22 16:07:35 2012
@@ -25,10 +25,13 @@
 import net.shibboleth.idp.profile.ProfileException;
 import net.shibboleth.idp.profile.ProfileRequestContext;
 
+import org.opensaml.messaging.context.navigate.ChildContextLookup;
 import org.springframework.webflow.execution.Event;
 import org.springframework.webflow.execution.RequestContext;
 
 import com.google.common.base.Function;
+
+//TODO get rid of exception
 
 /** A base class for authentication related actions. */
 public abstract class AbstractAuthenticationAction extends AbstractProfileAction {
@@ -38,6 +41,15 @@
      * {@link ProfileRequestContext}.
      */
     private Function<ProfileRequestContext, AuthenticationRequestContext> authnCtxLookupStrategy;
+
+    /** Constructor. */
+    public AbstractAuthenticationAction() {
+        super();
+
+        authnCtxLookupStrategy =
+                new ChildContextLookup<ProfileRequestContext, AuthenticationRequestContext>(
+                        AuthenticationRequestContext.class, false);
+    }
 
     /** {@inheritDoc} */
     protected final Event doExecute(@Nonnull final HttpServletRequest httpRequest,

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationRequestContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationRequestContext.java?rev=4215&r1=4214&r2=4215&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationRequestContext.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationRequestContext.java Sun Jul 22 16:07:35 2012
@@ -18,15 +18,19 @@
 package net.shibboleth.idp.authn;
 
 import java.security.Principal;
-import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import javax.annotation.concurrent.ThreadSafe;
 
 import net.shibboleth.idp.session.AuthenticationEvent;
+import net.shibboleth.idp.session.IdPSession;
+import net.shibboleth.utilities.java.support.annotation.constraint.Live;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 import net.shibboleth.utilities.java.support.annotation.constraint.NullableElements;
 import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
@@ -37,6 +41,8 @@
 
 import com.google.common.base.Objects;
 import com.google.common.base.Optional;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap.Builder;
 
 /** A context representing the state of an authentication attempt. */
 @ThreadSafe
@@ -48,11 +54,20 @@
     /** Whether authentication must occur even if an existing authentication event exists and is still valid. */
     private boolean forcingAuthentication;
 
-    /** Authentication workflow used if user authentication is needed but no particular workflows are requested. */
-    private Optional<AuthenticationWorkflowDescriptor> defaultWorfklow;
-
-    /** Authentication workflows, in order of preference, that must be used if user authentication is required. */

[... 309 lines stripped ...]


More information about the commits mailing list