[java-identity-provider COMMIT] in /trunk/idp-authn-api/src: main/java/net/shibboleth/idp/authn/AuthenticationRequest...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Mar 26 14:58:01 BST 2012
Author: lajoie
Date: Mon Mar 26 14:58:01 2012
New Revision: 4138
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4138&view=rev
Log:
Mark and check constraints
Unit tests and bug fixes
Added:
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/session/IdPSessionContextTest.java (contents, props changed)
- copied, changed from r4130, trunk/idp-authn-api/src/test/java/net/shibboleth/idp/session/IdPSessionSubcontextTest.java
Removed:
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/session/IdPSessionSubcontextTest.java
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationRequestContext.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationWorkflowDescriptor.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/UsernamePrincipal.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/AuthenticationEvent.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/IdPSession.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/session/ServiceSession.java
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/authn/AuthenticationRequestContextTest.java
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/authn/AuthenticationWorkflowDescriptorTest.java
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/authn/UsernamePasswordContextTest.java
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/authn/UsernamePrincipalTest.java
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/session/AuthenticationEventTest.java
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/session/IdPSessionTest.java
trunk/idp-authn-api/src/test/java/net/shibboleth/idp/session/ServiceSessionTest.java
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=4138&r1=4137&r2=4138&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 Mon Mar 26 14:58:01 2012
@@ -22,11 +22,20 @@
import java.util.Collections;
import java.util.List;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;
import net.shibboleth.idp.session.AuthenticationEvent;
-
+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;
+
+import org.joda.time.DateTime;
import org.opensaml.messaging.context.BaseContext;
+
+import com.google.common.base.Objects;
+import com.google.common.base.Optional;
/** A context representing the state of an authentication attempt. */
@ThreadSafe
@@ -39,16 +48,16 @@
private boolean forcingAuthentication;
/** Authentication workflow used if user authentication is needed but no particular workflows are requested. */
- private AuthenticationWorkflowDescriptor defaultWorfklow;
+ private Optional<AuthenticationWorkflowDescriptor> defaultWorfklow;
/** Authentication workflows, in order of preference, that must be used if user authentication is required. */
private List<AuthenticationWorkflowDescriptor> requestedWorkflows;
/** Authentication workflow that was attempted in order to authenticate the user. */
- private AuthenticationWorkflowDescriptor attemptedWorkflow;
+ private Optional<AuthenticationWorkflowDescriptor> attemptedWorkflow;
/** The authenticated principal. */
- private Principal authenticatedPrincipal;
+ private Optional<Principal> authenticatedPrincipal;
/** Time, in milliseconds since the epoch, when authentication process completed. */
private long completionInstant;
@@ -58,7 +67,12 @@
super();
initiationInstant = System.currentTimeMillis();
+
+ defaultWorfklow = Optional.absent();
requestedWorkflows = Collections.emptyList();
+ attemptedWorkflow = Optional.absent();
+
+ authenticatedPrincipal = Optional.absent();
}
/**
@@ -88,7 +102,7 @@
/**
* Gets whether authentication must occur even if an existing authentication event exists and is still valid.
*
- * @return Returns the forcingAuthentication.
+ * @return whether authentication must occur
*/
public boolean isForcingAuthentication() {
return forcingAuthentication;
@@ -97,11 +111,10 @@
/**
* Sets whether authentication must occur even if an existing authentication event exists and is still valid.
*
- * @param isForcingAuthentication whether authentication must occur even if an existing authentication event exists
[... 1731 lines stripped ...]
More information about the commits
mailing list