Class ValidateSAMLAuthentication

    • Constructor Detail

      • ValidateSAMLAuthentication

        public ValidateSAMLAuthentication()
        Constructor.
    • Method Detail

      • setTranscoderRegistry

        public void setTranscoderRegistry​(@Nullable
                                          ReloadableService<AttributeTranscoderRegistry> registry)
        Sets the registry of transcoding rules to apply to encode attributes.
        Parameters:
        registry - registry service interface
      • setAttributeFilter

        public void setAttributeFilter​(@Nullable
                                       ReloadableService<AttributeFilter> filterService)
        Sets the filter service to use for inbound attributes.
        Parameters:
        filterService - optional filter service for inbound attributes
      • setMetadataResolver

        public void setMetadataResolver​(@Nullable
                                        MetadataResolver resolver)
        Set a metadata source to use during filtering.
        Parameters:
        resolver - metadata resolver
      • setLoggedAttributeId

        public void setLoggedAttributeId​(@Nullable @NotEmpty
                                         String id)
        An attribute ID to pull a "name" from for logging purposes.
        Parameters:
        id - attribute ID
        Since:
        4.2.0
      • doPreExecute

        protected boolean doPreExecute​(@Nonnull
                                       ProfileRequestContext profileRequestContext,
                                       @Nonnull
                                       AuthenticationContext authenticationContext)
        Performs this authentication action's pre-execute step. Default implementation just returns true.
        Overrides:
        doPreExecute in class AbstractValidationAction
        Parameters:
        profileRequestContext - the current IdP profile request context
        authenticationContext - the current authentication context
        Returns:
        true iff execution should continue
      • doExecute

        protected void doExecute​(@Nonnull
                                 ProfileRequestContext profileRequestContext,
                                 @Nonnull
                                 AuthenticationContext authenticationContext)
        Performs this authentication action. Default implementation throws an exception.
        Overrides:
        doExecute in class AbstractAuthenticationAction
        Parameters:
        profileRequestContext - the current IdP profile request context
        authenticationContext - the current authentication context
      • logSuccess

        protected void logSuccess()
        Log a successful authentication based on a designated attribute ID or the NameID value.
      • populateSubject

        @Nonnull
        protected Subject populateSubject​(@Nonnull
                                          Subject subject)
        Subclasses must override this method to complete the population of the Subject with Principal and credential information based on the validation they perform.

        Typically this will include attaching a UsernamePrincipal, but this is not a requirement if other components are suitably overridden.

        Specified by:
        populateSubject in class AbstractValidationAction
        Parameters:
        subject - subject to populate
        Returns:
        the input subject
      • processAttributes

        private void processAttributes​(@Nonnull
                                       ProfileRequestContext profileRequestContext)
        Process the inbound SAML Attributes.
        Parameters:
        profileRequestContext - current profile request context
      • filterAttributes

        private void filterAttributes​(@Nonnull
                                      ProfileRequestContext profileRequestContext)
        Check for inbound attributes and apply filtering.
        Parameters:
        profileRequestContext - current profile request context
      • populateFilterContext

        private void populateFilterContext​(@Nonnull
                                           ProfileRequestContext profileRequestContext,
                                           @Nonnull
                                           AttributeFilterContext filterContext)
        Fill in the filter context data.
        Parameters:
        profileRequestContext - current profile request context
        filterContext - context to populate