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

noreply at shibboleth.net noreply at shibboleth.net
Tue Aug 6 23:22:33 EDT 2013


Author: scantor
Date: Tue Aug  6 23:22:33 2013
New Revision: 4670

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4670&view=rev
Log:
Action to finalize a flow and canonicalize subject.

Added:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/SimpleSubjectCanonicalizer.java   (with props)
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/FinalizeAuthenticationFlow.java   (with props)
Modified:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationContext.java

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java?rev=4670&r1=4669&r2=4670&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationFlowDescriptor.java Tue Aug  6 23:22:33 2013
@@ -70,8 +70,11 @@
      */
     @Nonnull private Subject supportedPrincipals;
     
-    /** Custom serializer for the resulting events generated by this flow. */
-    @Nullable private StorageSerializer<AuthenticationResult> eventSerializer;
+    /** Custom serializer for the results generated by this flow. */
+    @Nullable private StorageSerializer<AuthenticationResult> resultSerializer;
+    
+    /** Custom subject canonicalization plugin for subjects generated by this flow. */
+    @Nonnull private SubjectCanonicalizer subjectCanonicalizer;
 
     /**
      * Constructor.
@@ -81,6 +84,7 @@
     public AuthenticationFlowDescriptor(@Nonnull @NotEmpty final String id) {
         flowId = Constraint.isNotNull(StringSupport.trimOrNull(id), "Workflow ID cannot be null or empty");
         supportedPrincipals = new Subject();
+        subjectCanonicalizer = new SimpleSubjectCanonicalizer();
     }
 
     /** {@inheritDoc} */
@@ -224,23 +228,41 @@
     }
    
     /**
-     * Get the custom serializer for events produced by this flow.
+     * Get the custom serializer for results produced by this flow.
      * 
      * @return the custom serializer, or null
      */
-    @Nullable public StorageSerializer<AuthenticationResult> getEventSerializer() {
-        return eventSerializer;
-    }
-
-    /**
-     * Set the custom serializer for events produced by this flow.
+    @Nullable public StorageSerializer<AuthenticationResult> getResultSerializer() {
+        return resultSerializer;
+    }
+
+    /**
+     * Set the custom serializer for results produced by this flow.
      * 
      * @param serializer the custom serializer, or null
      */
-    public void setEventSerializer(@Nullable final StorageSerializer<AuthenticationResult> serializer) {
-        eventSerializer = serializer;
-    }
-    
+    public void setResultSerializer(@Nullable final StorageSerializer<AuthenticationResult> serializer) {
+        resultSerializer = serializer;
+    }
+
+    /**
+     * Get the custom canonicalizer for subjects produced by this flow.
+     * 
+     * @return the custom canonicalizer, or null
+     */
+    @Nonnull public SubjectCanonicalizer getSubjectCanonicalizer() {
+        return subjectCanonicalizer;
+    }
+
+    /**
+     * Set the custom canonicalizer for subjects produced by this flow.
+     * 
+     * @param canonicalizer the custom canonicalizer, or null
+     */
+    public void setSubjectCanonicalizer(@Nonnull final SubjectCanonicalizer canonicalizer) {
+        subjectCanonicalizer = Constraint.isNotNull(canonicalizer, "SubjectCanonicalizer cannot be null");
+    }
+        
     /** {@inheritDoc} */
     public int hashCode() {
         return flowId.hashCode();

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java?rev=4670&r1=4669&r2=4670&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthenticationResult.java Tue Aug  6 23:22:33 2013
@@ -44,6 +44,9 @@
 
     /** The Subject established by the authentication result. */
     @Nonnull private final Subject subject;
+    
+    /** The canonical principal name derived from the subject. */
+    @Nullable private String canonicalPrincipalName;
 
     /** The identifier of the flow used to produce this result. */
     @Nonnull @NotEmpty private final String authenticationFlowId;
@@ -91,6 +94,24 @@

[... 56 lines stripped ...]


More information about the commits mailing list