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

noreply at shibboleth.net noreply at shibboleth.net
Mon Aug 19 11:20:27 EDT 2013


Author: scantor
Date: Mon Aug 19 11:20:27 2013
New Revision: 4706

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4706&view=rev
Log:
Unit test for checking requested principals in validation action

Added:
    trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/TestPrincipal.java   (with props)
Modified:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java
    trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlowTest.java
    trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateUserAgentAddressTest.java

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java?rev=4706&r1=4705&r2=4706&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java Mon Aug 19 11:20:27 2013
@@ -49,6 +49,8 @@
 /**
  * A base class for authentication related actions that validate credentials and produce an
  * {@link AuthenticationResult}.
+ * 
+ * @event {@link AuthnEventIds#REQUEST_UNSUPPORTED}
  */
 public abstract class AbstractValidationAction extends AbstractAuthenticationAction
     implements PrincipalSupportingComponent {
@@ -255,6 +257,7 @@
             }
             
             log.info("{} Skipping validator, not compatible with request's principal requirements", getLogPrefix());
+            ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.REQUEST_UNSUPPORTED);
             return false;
         }
         

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java?rev=4706&r1=4705&r2=4706&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java Mon Aug 19 11:20:27 2013
@@ -29,8 +29,8 @@
     /** ID of event returned if there are no authentication flows that could be used to authenticate the user. */
     public static final String NO_POTENTIAL_FLOW = "NoPotentialFlow";
 
-    /** ID of event returned if there no authentication flows that can satisfy the request's requirements. */
-    public static final String NO_REQUESTED_FLOW = "NoRequestedFlow";
+    /** ID of event returned if the request's authentication requirements can't be met by an action or flow. */
+    public static final String REQUEST_UNSUPPORTED = "RequestUnsupported";
     
     /** ID of event returned if there are no credentials available in the request. */
     public static final String NO_CREDENTIALS = "NoCredentials";

Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java?rev=4706&r1=4705&r2=4706&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java (original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java Mon Aug 19 11:20:27 2013
@@ -54,7 +54,7 @@
  * 
  * @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID} (reuse of a result, i.e., SSO)
  * @event {@link AuthnEventIds#NO_POTENTIAL_FLOW}
- * @event {@link AuthnEventIds#NO_REQUESTED_FLOW}
+ * @event {@link AuthnEventIds#REQUEST_UNSUPPORTED}
  * @event Selected flow ID to execute
  * @pre <pre>ProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null</pre>
  * @pre The content of {@link AuthenticationContext#getPotentialFlows()} are assumed to be acceptable
@@ -141,7 +141,7 @@
         }
         
         log.info("{} none of the potential authentication flows can satisfy the request", getLogPrefix());
-        ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.NO_REQUESTED_FLOW);
+        ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.REQUEST_UNSUPPORTED);
     }
     
     /**
@@ -183,7 +183,7 @@
             }
             
             log.info("{} none of the potential authentication flows can satisfy the request", getLogPrefix());
-            ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.NO_REQUESTED_FLOW);

[... 96 lines stripped ...]


More information about the commits mailing list