Class ValidateDuoTokenAuthenticationResult
- java.lang.Object
-
- net.shibboleth.utilities.java.support.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.authn.AbstractValidationAction
-
- net.shibboleth.idp.plugin.authn.duo.impl.ValidateDuoTokenAuthenticationResult
-
- All Implemented Interfaces:
net.shibboleth.idp.authn.principal.PrincipalSupportingComponent,Component,DestructableComponent,InitializableComponent,ProfileAction,Aware,MessageSource,MessageSourceAware,Action
public class ValidateDuoTokenAuthenticationResult extends net.shibboleth.idp.authn.AbstractValidationActionA validation action that checks for a valid Duo authentication token and directly produces anAuthenticationResultbased on the identity described by the token.- Event:
EventIds.PROCEED_EVENT_ID,AuthnEventIds.AUTHN_EXCEPTION,AuthnEventIds.INVALID_AUTHN_CTX- Precondition:
ProfileRequestContext.getSubcontext(AuthenticationContext.class, false) != null,AuthenticationContext.getSubcontext(DuoOIDCAuthenticationContext.class, false) != null
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValidateDuoTokenAuthenticationResult.DuoOIDCCleanupHookA default cleanup hook that removes theDuoOIDCAuthenticationContextfrom the tree.
-
Field Summary
Fields Modifier and Type Field Description private com.nimbusds.jwt.JWTClaimsSetclaimsSetThe parsed claimset.private Function<ProfileRequestContext,Collection<Principal>>contextToPrincipalMappingStrategyHook to map context information (often Duo factors in the Duo token) to principal collections.private DuoOIDCAuthenticationContextduoContextDuo authentiction context.private org.slf4j.LoggerlogClass logger.private ProfileRequestContextprcThe profile request context.private StringusernameAttempted username.
-
Constructor Summary
Constructors Constructor Description ValidateDuoTokenAuthenticationResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuildAuthenticationResult(ProfileRequestContext profileRequestContext, net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)protected voiddoExecute(ProfileRequestContext profileRequestContext, net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)protected booleandoPreExecute(ProfileRequestContext profileRequestContext, net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)Function<ProfileRequestContext,Collection<Principal>>getContextToPrincipalMappingStrategy()Get the context to principal mapping strategy for mapping context information into principal collections e.g.protected SubjectpopulateSubject(Subject subject)voidsetContextToPrincipalMappingStrategy(Function<ProfileRequestContext,Collection<Principal>> hook)Set the context to principal mapping strategy for mapping context information into principal collections e.g.-
Methods inherited from class net.shibboleth.idp.authn.AbstractValidationAction
addDefaultPrincipals, getClassifiedErrors, getCleanupHook, getMetricName, getRequesterLookupStrategy, getResponderLookupStrategy, getResultCachingPredicate, getSubject, getSupportedPrincipals, handleError, handleError, handleWarning, recordFailure, recordFailure, recordSuccess, recordSuccess, setAddDefaultPrincipals, setClassifiedMessages, setCleanupHook, setMetricName, setRequesterLookupStrategy, setResponderLookupStrategy, setResultCachingPredicate, setSupportedPrincipals
-
Methods inherited from class net.shibboleth.idp.authn.AbstractAuthenticationAction
doExecute, doPreExecute, setAuthenticationContextLookupStrategy
-
Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction
doExecute, execute, getMessage, getMessage, getMessage, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy
-
Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction
getActivationCondition, setActivationCondition
-
Methods inherited from class org.opensaml.profile.action.AbstractProfileAction
doPostExecute, doPostExecute, execute, getHttpServletRequest, getHttpServletResponse, getLogPrefix, setHttpServletRequest, setHttpServletResponse
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent
initialize, isInitialized
-
-
-
-
Field Detail
-
log
@Nonnull private final org.slf4j.Logger log
Class logger.
-
duoContext
@Nullable private DuoOIDCAuthenticationContext duoContext
Duo authentiction context.
-
prc
@Nullable private ProfileRequestContext prc
The profile request context.
-
claimsSet
@Nullable private com.nimbusds.jwt.JWTClaimsSet claimsSet
The parsed claimset.
-
contextToPrincipalMappingStrategy
@Nullable private Function<ProfileRequestContext,Collection<Principal>> contextToPrincipalMappingStrategy
Hook to map context information (often Duo factors in the Duo token) to principal collections.
-
-
Method Detail
-
getContextToPrincipalMappingStrategy
@Nullable public Function<ProfileRequestContext,Collection<Principal>> getContextToPrincipalMappingStrategy()
Get the context to principal mapping strategy for mapping context information into principal collections e.g. Duo factors.- Returns:
- the mapping hook
-
setContextToPrincipalMappingStrategy
public void setContextToPrincipalMappingStrategy(@Nullable Function<ProfileRequestContext,Collection<Principal>> hook)Set the context to principal mapping strategy for mapping context information into principal collections e.g. Duo factors.- Parameters:
hook- principal mapping hook
-
doPreExecute
protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)- Overrides:
doPreExecutein classnet.shibboleth.idp.authn.AbstractValidationAction
-
doExecute
protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)- Overrides:
doExecutein classnet.shibboleth.idp.authn.AbstractAuthenticationAction
-
populateSubject
protected Subject populateSubject(@Nonnull Subject subject)
- Specified by:
populateSubjectin classnet.shibboleth.idp.authn.AbstractValidationAction
-
buildAuthenticationResult
protected void buildAuthenticationResult(@Nonnull ProfileRequestContext profileRequestContext, @Nonnull net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)- Overrides:
buildAuthenticationResultin classnet.shibboleth.idp.authn.AbstractValidationAction
-
-