Class 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.AbstractValidationAction
    A validation action that checks for a valid Duo authentication token and directly produces an AuthenticationResult based 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
          
    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • claimsSet

        @Nullable
        private com.nimbusds.jwt.JWTClaimsSet claimsSet
        The parsed claimset.
      • username

        @Nullable
        @NotEmpty
        private String username
        Attempted username.
      • contextToPrincipalMappingStrategy

        @Nullable
        private Function<ProfileRequestContext,​Collection<Principal>> contextToPrincipalMappingStrategy
        Hook to map context information (often Duo factors in the Duo token) to principal collections.
    • Constructor Detail

      • ValidateDuoTokenAuthenticationResult

        public ValidateDuoTokenAuthenticationResult()
    • 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:
        doPreExecute in class net.shibboleth.idp.authn.AbstractValidationAction
      • doExecute

        protected void doExecute​(@Nonnull
                                 ProfileRequestContext profileRequestContext,
                                 @Nonnull
                                 net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)
        Overrides:
        doExecute in class net.shibboleth.idp.authn.AbstractAuthenticationAction
      • populateSubject

        protected Subject populateSubject​(@Nonnull
                                          Subject subject)
        Specified by:
        populateSubject in class net.shibboleth.idp.authn.AbstractValidationAction
      • buildAuthenticationResult

        protected void buildAuthenticationResult​(@Nonnull
                                                 ProfileRequestContext profileRequestContext,
                                                 @Nonnull
                                                 net.shibboleth.idp.authn.context.AuthenticationContext authenticationContext)
        Overrides:
        buildAuthenticationResult in class net.shibboleth.idp.authn.AbstractValidationAction