Class OAuth2ClientRegistrationAuthenticationValidator

java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.OAuth2ClientRegistrationAuthenticationValidator
All Implemented Interfaces:
Consumer<OAuth2ClientRegistrationAuthenticationContext>

public final class OAuth2ClientRegistrationAuthenticationValidator extends Object implements Consumer<OAuth2ClientRegistrationAuthenticationContext>
A Consumer providing access to the OAuth2ClientRegistrationAuthenticationContext containing an OAuth2ClientRegistrationAuthenticationToken and is the default authentication validator used for validating specific OAuth 2.0 Dynamic Client Registration Request parameters (RFC 7591).

The default implementation validates redirect_uris, jwks_uri, and scope. If validation fails, an OAuth2AuthenticationException is thrown.

Each validated field is backed by two public constants:

  • DEFAULT_*_VALIDATOR -- strict validation that rejects unsafe values. This is the default behavior and may reject input that was previously accepted.
  • SIMPLE_*_VALIDATOR -- lenient validation preserving the behavior from prior releases. Use only when strictly required for backward compatibility and with full understanding that it may accept values that enable attacks against the authorization server.
Since:
7.0.5
See Also: