Interface OAuth2TokenValidator<T>

All Known Implementing Classes:
DelegatingOAuth2TokenValidator, JwtAudienceValidator, JwtClaimValidator, JwtIssuerValidator, JwtTimestampValidator, OAuth2AuthorizationValidator

public interface OAuth2TokenValidator<T>

One check a token is put to after its signature has verified: is it still in date, is it from the issuer this server trusts, is it meant for this server.

OAuth2TokenValidator<Jwt> tenant = jwt -> "acme".equals(jwt.getClaimAsString("tenant"))
        ? OAuth2TokenValidatorResult.success()
        : OAuth2TokenValidatorResult.failure(new OAuth2Error("invalid_token",
                "The token is for another tenant", null));
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(T token)
    Whether token passes, and why not.