Class AbstractDuoAuthenticationAction

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.authn.AbstractAuthenticationAction
net.shibboleth.idp.plugin.authn.duo.AbstractDuoAuthenticationAction
All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, ProfileAction, Aware, MessageSource, MessageSourceAware, Action

public abstract class AbstractDuoAuthenticationAction extends net.shibboleth.idp.authn.AbstractAuthenticationAction

A base class for Duo 2FA authentication related actions.

In addition to the work performed by AbstractAuthenticationAction, this action also looks up and makes available the DuoOIDCAuthenticationContext.

Duo 2FA authentication action implementations should override the doExecute(ProfileRequestContext, AuthenticationContext, DuoOIDCAuthenticationContext) method.

Event:
AuthnEventIds.INVALID_AUTHN_CTX
Precondition:
ProfileRequestContext.getSubcontext(AuthenticationContext.class) != null
Postcondition:
AuthenticationContext.getSubcontext(DuoOIDCAuthenticationContext.class) != null
  • Field Details

  • Constructor Details

    • AbstractDuoAuthenticationAction

      protected AbstractDuoAuthenticationAction()
      Constructor.
  • Method Details

    • setDuoContextLookupStrategy

      public void setDuoContextLookupStrategy(@Nonnull Function<ProfileRequestContext,DuoOIDCAuthenticationContext> strategy)
      Set Duo authentication context lookup strategy to use.
      Parameters:
      strategy - lookup strategy
    • doPreExecute

      protected final boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)
      Overrides:
      doPreExecute in class net.shibboleth.idp.authn.AbstractAuthenticationAction
    • doExecute

      protected final void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)
      Delegates to doExecute(ProfileRequestContext, AuthenticationContext, DuoOIDCAuthenticationContext) to perform the actual authentication. Implementations can not override this method.
      Overrides:
      doExecute in class net.shibboleth.idp.authn.AbstractAuthenticationAction
      Parameters:
      profileRequestContext - the current IdP profile request context
      authenticationContext - the current authentication context
    • doPreExecute

      protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext, @Nonnull DuoOIDCAuthenticationContext context)
      Performs this authentication action's pre-execute step. Default implementation just returns true.
      Parameters:
      profileRequestContext - the current IdP profile request context
      authenticationContext - the current authentication context
      context - the Duo authentication context
      Returns:
      true iff execution should continue
    • doExecute

      protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext, @Nonnull DuoOIDCAuthenticationContext context)
      Performs this Duo authentication action using the supplied Duo context. Implementations should override this method.
      Parameters:
      profileRequestContext - the current IdP profile request context
      authenticationContext - the current authentication context
      context - the Duo authentication context