[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationWorkflo...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Jul 17 15:32:59 EDT 2013
Author: scantor
Date: Wed Jul 17 15:32:59 2013
New Revision: 4589
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4589&view=rev
Log:
More refactoring of core authn APIs.
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationWorkflowDescriptor.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/SubjectContext.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/context/AuthenticationContextTest.java
trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/impl/profile/saml2/SetRequestedAuthenticationWorkflows.java
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationWorkflowDescriptor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationWorkflowDescriptor.java?rev=4589&r1=4588&r2=4589&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationWorkflowDescriptor.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationWorkflowDescriptor.java Wed Jul 17 15:32:59 2013
@@ -17,16 +17,30 @@
package net.shibboleth.idp.authn;
+import java.security.Principal;
+import java.util.List;
+import java.util.Set;
+
import javax.annotation.Nonnull;
+import javax.security.auth.Subject;
import com.google.common.base.Objects;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
+import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
import net.shibboleth.utilities.java.support.component.IdentifiableComponent;
import net.shibboleth.utilities.java.support.logic.Constraint;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
-/** A descriptor of an authentication workflow. */
+/**
+ * A descriptor of an authentication workflow.
+ *
+ * <p>A workflow models a subflow that performs authentication in a particular way and satisfies
+ * various constraints that may apply to an authentication request. Some of these constraints are
+ * directly exposed as properties of the workflow, and others can be found by examining the list
+ * of extended {@link Principal}s that the workflow exposes.</p>
+ */
public class AuthenticationWorkflowDescriptor implements IdentifiableComponent {
/** The unique identifier of the authentication workflow. */
@@ -40,9 +54,9 @@
/** Maximum amount of time in milliseconds, since first usage, a workflow should be considered active. */
private long lifetime;
-
- /** Maximum amount of time in milliseconds, since more recent usage, a workflow should be considered active. */
- private long timeout;
+
+ /** Supported principals, indexed by type, that the workflow can produce. */
+ @Nonnull private Subject supportedPrincipals;
/**
* Constructor.
@@ -50,7 +64,8 @@
* @param id unique ID of this workflow, can not be null or empty
*/
public AuthenticationWorkflowDescriptor(@Nonnull @NotEmpty final String id) {
- workflowId = Constraint.isNotNull(StringSupport.trimOrNull(id), "Workflow ID can not be null or empty");
+ workflowId = Constraint.isNotNull(StringSupport.trimOrNull(id), "Workflow ID cannot be null or empty");
+ supportedPrincipals = new Subject();
}
/** {@inheritDoc} */
@@ -96,7 +111,7 @@
/**
* Gets the maximum amount of time in milliseconds, since first usage, a workflow should be considered active. A
- * value of 0 indicates that their is no upper limit on the lifetime on an active workflow.
+ * value of 0 indicates that there is no upper limit on the lifetime on an active workflow.
*
* @return maximum amount of time in milliseconds a workflow should be considered active, never less than 0
*/
@@ -106,7 +121,7 @@
/**
* Sets the maximum amount of time in milliseconds, since first usage, a workflow should be considered active. A
- * value of 0 indicates that their is no upper limit on the lifetime on an active workflow.
+ * value of 0 indicates that there is no upper limit on the lifetime on an active workflow.
*
* @param workflowLifetime the lifetime for the workflow, must be 0 or greater
*/
@@ -115,27 +130,28 @@
}
/**
- * Gets the maximum amount of time in milliseconds, since more recent usage, a workflow should be considered active.
- * A value of 0 indicates that their is no inactivity timeout on an active workflow.
+ * Get a set of supported non-user-specific principals that the workflow may produce when it operates.
*
- * @return Returns the duration.
+ * @param <T> type of Principal to inquire on
[... 567 lines stripped ...]
More information about the commits
mailing list