Class PopulatePasswordlessContext
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.plugin.authn.duo.impl.PopulatePasswordlessContext
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
A profile action to extract passwordless username from a sealed cookie and populate it
into an existing
DuoPasswordlessContext.
If the context contains a username already, the action simply proceeds.
If the cookie exists but signals an opt-out, then the AuthnEventIds.RESELECT_FLOW
event is signalled.
- Since:
- 2.1.0
- Event:
EventIds.PROCEED_EVENT_ID,EventIds.INVALID_PROFILE_CTX,AuthnEventIds.REQUEST_UNSUPPORTED,AuthnEventIds.RESELECT_FLOW- Precondition:
AuthenticationContext.getSubcontext(DuoPasswordlessContext.class) != null
- Postcondition:
DuoPasswordlessContext.getUsername() != null
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate PasswordlessCookieManagerOptional cookie manager to use.Strategy used to locate theDuoPasswordlessContextto operate on.private final org.slf4j.LoggerClass logger.private DuoPasswordlessContextContext to populate. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoExecute(ProfileRequestContext profileRequestContext) protected voidprotected booleandoPreExecute(ProfileRequestContext profileRequestContext) voidSetsPasswordlessCookieManagerto use.voidsetDuoPasswordlessContextLookupStrategy(Function<ProfileRequestContext, DuoPasswordlessContext> strategy) Set the strategy used to locate theDuoPasswordlessContextto operate on.Methods 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, 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
@Nonnull private final org.slf4j.Logger logClass logger. -
duoPasswordlessContextLookupStrategy
@Nonnull private Function<ProfileRequestContext,DuoPasswordlessContext> duoPasswordlessContextLookupStrategyStrategy used to locate theDuoPasswordlessContextto operate on. -
cookieManager
Optional cookie manager to use. -
passwordlessContext
Context to populate.
-
-
Constructor Details
-
PopulatePasswordlessContext
public PopulatePasswordlessContext()Constructor.
-
-
Method Details
-
setDuoPasswordlessContextLookupStrategy
public void setDuoPasswordlessContextLookupStrategy(@Nonnull Function<ProfileRequestContext, DuoPasswordlessContext> strategy) Set the strategy used to locate theDuoPasswordlessContextto operate on.- Parameters:
strategy- lookup strategy
-
setCookieManager
SetsPasswordlessCookieManagerto use.- Parameters:
manager- cookie manager
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
doPreExecute
- Overrides:
doPreExecutein classAbstractConditionalProfileAction
-
doExecute
- Overrides:
doExecutein classAbstractProfileAction
-