Class JwtClientAssertionAuthenticationProvider

java.lang.Object
org.springframework.security.oauth2.server.authorization.authentication.JwtClientAssertionAuthenticationProvider
All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider

public final class JwtClientAssertionAuthenticationProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
An AuthenticationProvider implementation used for OAuth 2.0 Client Authentication, which authenticates the Jwt client_assertion parameter.
Since:
0.2.3
See Also:
  • Constructor Details

    • JwtClientAssertionAuthenticationProvider

      public JwtClientAssertionAuthenticationProvider(RegisteredClientRepository registeredClientRepository, OAuth2AuthorizationService authorizationService)
      Constructs a JwtClientAssertionAuthenticationProvider using the provided parameters.
      Parameters:
      registeredClientRepository - the repository of registered clients
      authorizationService - the authorization service
  • Method Details

    • authenticate

      public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
      Specified by:
      authenticate in interface org.springframework.security.authentication.AuthenticationProvider
      Throws:
      org.springframework.security.core.AuthenticationException
    • supports

      public boolean supports(Class<?> authentication)
      Specified by:
      supports in interface org.springframework.security.authentication.AuthenticationProvider
    • setJwtDecoderFactory

      public void setJwtDecoderFactory(org.springframework.security.oauth2.jwt.JwtDecoderFactory<RegisteredClient> jwtDecoderFactory)
      Sets the JwtDecoderFactory that provides a JwtDecoder for the specified RegisteredClient and is used for authenticating a Jwt Bearer Token during OAuth 2.0 Client Authentication. The default factory is JwtClientAssertionDecoderFactory.
      Parameters:
      jwtDecoderFactory - the JwtDecoderFactory that provides a JwtDecoder for the specified RegisteredClient
      Since:
      0.4.0