Class ValidateExternalAuthentication

    • Field Detail

      • log

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

        @Nullable
        private MetadataResolver metadataResolver
        Optional supplemental metadata source for filtering.
      • matchExpression

        @Nullable
        private Pattern matchExpression
        A regular expression to apply for acceptance testing.
      • attributeContext

        @Nullable
        private AttributeContext attributeContext
        Context for externally supplied inbound attributes.
    • Constructor Detail

      • ValidateExternalAuthentication

        public ValidateExternalAuthentication()
        Constructor.
      • ValidateExternalAuthentication

        public ValidateExternalAuthentication​(@Nullable
                                              ReloadableService<AttributeFilter> filterService)
        Constructor.
        Parameters:
        filterService - optional filter service for inbound attributes
        Since:
        4.0.0
    • Method Detail

      • setMatchExpression

        public void setMatchExpression​(@Nullable
                                       Pattern expression)
        Set a matching expression to apply for username acceptance.
        Parameters:
        expression - a matching expression
      • setMetadataResolver

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

        private boolean checkUsername​(@Nonnull
                                      Subject subject)
        Validate the username if necessary.
        Parameters:
        subject - subject containing a UsernamePrincipal to check
        Returns:
        true iff the username is acceptable
      • filterAttributes

        private void filterAttributes()
        Check for inbound attributes and apply filtering.
      • populateFilterContext

        private void populateFilterContext​(@Nonnull
                                           AttributeFilterContext filterContext)
        Fill in the filter context data.

        This is a very minimally populated context with nothing much set except possibly issuer, based on the AuthenticationAuthorities data.

        Parameters:
        filterContext - context to populate