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
ConstructorsConstructorDescriptionJwtClientAssertionAuthenticationProvider(RegisteredClientRepository registeredClientRepository, OAuth2AuthorizationService authorizationService) Constructs aJwtClientAssertionAuthenticationProviderusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) voidsetJwtDecoderFactory(org.springframework.security.oauth2.jwt.JwtDecoderFactory<RegisteredClient> jwtDecoderFactory) Sets theJwtDecoderFactorythat provides aJwtDecoderfor the specifiedRegisteredClientand is used for authenticating aJwtBearer Token during OAuth 2.0 Client Authentication.boolean
-
Constructor Details
-
JwtClientAssertionAuthenticationProvider
public JwtClientAssertionAuthenticationProvider(RegisteredClientRepository registeredClientRepository, OAuth2AuthorizationService authorizationService) Constructs aJwtClientAssertionAuthenticationProviderusing 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:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
supports
- Specified by:
supportsin interfaceorg.springframework.security.authentication.AuthenticationProvider
-
setJwtDecoderFactory
public void setJwtDecoderFactory(org.springframework.security.oauth2.jwt.JwtDecoderFactory<RegisteredClient> jwtDecoderFactory) Sets theJwtDecoderFactorythat provides aJwtDecoderfor the specifiedRegisteredClientand is used for authenticating aJwtBearer Token during OAuth 2.0 Client Authentication. The default factory isJwtClientAssertionDecoderFactory.- Parameters:
jwtDecoderFactory- theJwtDecoderFactorythat provides aJwtDecoderfor the specifiedRegisteredClient- Since:
- 0.4.0
-