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 Summary
ConstructorDescriptionJwtClientAssertionAuthenticationProvider
(RegisteredClientRepository registeredClientRepository, OAuth2AuthorizationService authorizationService) Constructs aJwtClientAssertionAuthenticationProvider
using the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
authenticate
(org.springframework.security.core.Authentication authentication) void
setJwtDecoderFactory
(org.springframework.security.oauth2.jwt.JwtDecoderFactory<RegisteredClient> jwtDecoderFactory) Sets theJwtDecoderFactory
that provides aJwtDecoder
for the specifiedRegisteredClient
and is used for authenticating aJwt
Bearer Token during OAuth 2.0 Client Authentication.boolean
-
Constructor Details
-
JwtClientAssertionAuthenticationProvider
public JwtClientAssertionAuthenticationProvider(RegisteredClientRepository registeredClientRepository, OAuth2AuthorizationService authorizationService) Constructs aJwtClientAssertionAuthenticationProvider
using the provided parameters.- Parameters:
registeredClientRepository
- the repository of registered clientsauthorizationService
- 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 interfaceorg.springframework.security.authentication.AuthenticationProvider
- Throws:
org.springframework.security.core.AuthenticationException
-
supports
- Specified by:
supports
in interfaceorg.springframework.security.authentication.AuthenticationProvider
-
setJwtDecoderFactory
public void setJwtDecoderFactory(org.springframework.security.oauth2.jwt.JwtDecoderFactory<RegisteredClient> jwtDecoderFactory) Sets theJwtDecoderFactory
that provides aJwtDecoder
for the specifiedRegisteredClient
and is used for authenticating aJwt
Bearer Token during OAuth 2.0 Client Authentication. The default factory isJwtClientAssertionDecoderFactory
.- Parameters:
jwtDecoderFactory
- theJwtDecoderFactory
that provides aJwtDecoder
for the specifiedRegisteredClient
- Since:
- 0.4.0
-