Class AuthenticationAudienceClaimsValidator

    • Field Detail

      • endpointTargets

        @Nonnull
        private List<String> endpointTargets
        The substrings to replace from resolved endpoint with one configured at endpointReplacement.
      • endpointReplacement

        @Nullable
        private String endpointReplacement
        The replacement substring for the endpoint containing any ones configured at endpointTargets.
    • Constructor Detail

      • AuthenticationAudienceClaimsValidator

        public AuthenticationAudienceClaimsValidator()
        Constructor.
    • Method Detail

      • setResponderIdLookupStrategy

        public void setResponderIdLookupStrategy​(@Nonnull
                                                 Function<ProfileRequestContext,​String> strategy)
        Set the lookup function for the responder identifier.
        Parameters:
        strategy - What to set.
      • setEndpointTargets

        public void setEndpointTargets​(@Nonnull
                                       List<String> paths)
        Set the substrings to replace from resolved endpoint with one configured at endpointReplacement.
        Parameters:
        paths - What to set.
      • setEndpointReplacement

        public void setEndpointReplacement​(@Nullable
                                           String path)
        Set the replacement substring for the endpoint containing any ones configured at endpointTargets.
        Parameters:
        path - What to set.
      • resolveAcceptedAudiences

        @Nonnull
        @NotEmpty
        protected Set<String> resolveAcceptedAudiences​(@Nonnull
                                                       com.nimbusds.jwt.JWTClaimsSet claims,
                                                       @Nonnull
                                                       ProfileRequestContext context)
                                                throws JWTValidationException
        Resolve the set of accepted audiences. The accepted audience resolved by the super-class AudienceClaimsValidator is expected to be an endpoint URL of the HTTP request containing the JWT authentication. If endpointTargets and endpointReplacement are configured, they're exploited in adding the an additional accepted audience. The responder ID is also included to the accepted audience values.
        Overrides:
        resolveAcceptedAudiences in class AudienceClaimsValidator
        Parameters:
        claims - the claims fed for the audience lookup strategy
        context - the profile request context fed for the audience lookup strategy
        Returns:
        the set containing the accepted audience values
        Throws:
        JWTValidationException - if the audience value could not be resolved via lookup strategy