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

noreply at shibboleth.net noreply at shibboleth.net
Tue Jan 7 12:57:15 EST 2014


Author: scantor
Date: Tue Jan  7 12:57:15 2014
New Revision: 5162

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5162&view=rev
Log:
Change the event returned for a missing context.

Modified:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractAuthenticationAction.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=5162&r1=5161&r2=5162&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 Tue Jan  7 12:57:15 2014
@@ -27,7 +27,6 @@
 import org.opensaml.profile.ProfileException;
 import org.opensaml.profile.action.AbstractProfileAction;
 import org.opensaml.profile.action.ActionSupport;
-import org.opensaml.profile.action.EventIds;
 import org.opensaml.profile.context.ProfileRequestContext;
 import org.opensaml.messaging.context.navigate.ChildContextLookup;
 
@@ -36,13 +35,13 @@
 /**
  * A base class for authentication related actions.
  * 
- * In addition to the work performed by {@link AbstractProfileAction}, this action also looks up and makes available the
- * {@link AuthenticationContext}.
+ * In addition to the work performed by {@link AbstractProfileAction}, this action also looks up
+ * and makes available the {@link AuthenticationContext}.
  * 
  * Authentication action implementations should override
  * {@link #doExecute(ProfileRequestContext, AuthenticationContext)}
  * 
- * @event {@link EventIds#INVALID_PROFILE_CTX}
+ * @event {@link AuthnEventIds#INVALID_AUTHN_CTX}
  */
 public abstract class AbstractAuthenticationAction extends AbstractProfileAction {
 
@@ -57,9 +56,7 @@
 
     /** Constructor. */
     public AbstractAuthenticationAction() {
-        super();
-
-        authnCtxLookupStrategy = new ChildContextLookup(AuthenticationContext.class, false);
+        authnCtxLookupStrategy = new ChildContextLookup<>(AuthenticationContext.class, false);
     }
 
     /**
@@ -74,12 +71,13 @@
     }
     
     /** {@inheritDoc} */
+    @Override
     protected final boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext)
             throws ProfileException {
 
         authnContext = authnCtxLookupStrategy.apply(profileRequestContext);
         if (authnContext == null) {
-            ActionSupport.buildEvent(profileRequestContext, EventIds.INVALID_PROFILE_CTX);
+            ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_AUTHN_CTX);
             return false;
         }
 
@@ -91,6 +89,7 @@
     }
     
     /** {@inheritDoc} */
+    @Override
     protected final void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) throws ProfileException {
 
         doExecute(profileRequestContext, authnContext);



More information about the commits mailing list