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
- Direct Known Subclasses:
ExchangeCodeForDuoToken,HealthCheckDuoOIDCAuthAPI,ValidateDuoResponseState,ValidateTokenClaims,ValidateTokenSignature
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 Summary
FieldsModifier and TypeFieldDescriptionprivate DuoOIDCAuthenticationContextThe Duo authentication Context.Lookup strategy to locate the Duo authentication context.private final org.slf4j.LoggerClass logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voiddoExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext) Delegates todoExecute(ProfileRequestContext, AuthenticationContext, DuoOIDCAuthenticationContext)to perform the actual authentication.protected voiddoExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext, DuoOIDCAuthenticationContext context) Performs this Duo authentication action using the supplied Duo context.protected final booleandoPreExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext) protected booleandoPreExecute(ProfileRequestContext profileRequestContext, AuthenticationContext authenticationContext, DuoOIDCAuthenticationContext context) Performs this authentication action's pre-execute step.voidSet Duo authentication context lookup strategy to use.Methods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction
doExecute, doPreExecute, setAuthenticationContextLookupStrategyMethods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategyMethods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationConditionMethods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplierMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
Class logger. -
duoContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,DuoOIDCAuthenticationContext> duoContextLookupStrategyLookup strategy to locate the Duo authentication context. -
duoContext
The Duo authentication Context.
-
-
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 AuthenticationContext authenticationContext) - Overrides:
doPreExecutein classAbstractAuthenticationAction
-
doExecute
protected final void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull AuthenticationContext authenticationContext) Delegates todoExecute(ProfileRequestContext, AuthenticationContext, DuoOIDCAuthenticationContext)to perform the actual authentication. Implementations can not override this method.- Overrides:
doExecutein classAbstractAuthenticationAction- Parameters:
profileRequestContext- the current IdP profile request contextauthenticationContext- the current authentication context
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull 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 contextauthenticationContext- the current authentication contextcontext- the Duo authentication context- Returns:
- true iff execution should continue
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull 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 contextauthenticationContext- the current authentication contextcontext- the Duo authentication context
-