Class DPoPAuthenticationProvider
java.lang.Object
org.springframework.security.oauth2.server.resource.authentication.DPoPAuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public final class DPoPAuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider
An
AuthenticationProvider implementation that is responsible for authenticating
a DPoP-bound access token for a protected resource request.- Since:
- 6.5
- See Also:
-
DPoPAuthenticationTokenDPoPProofJwtDecoderFactory- RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP)
-
Constructor Summary
ConstructorsConstructorDescriptionDPoPAuthenticationProvider(org.springframework.security.authentication.AuthenticationManager tokenAuthenticationManager) Constructs aDPoPAuthenticationProviderusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) voidsetDPoPProofVerifierFactory(org.springframework.security.oauth2.jwt.JwtDecoderFactory<org.springframework.security.oauth2.jwt.DPoPProofContext> dPoPProofVerifierFactory) Sets theJwtDecoderFactorythat provides aJwtDecoderfor the specifiedDPoPProofContextand is used for authenticating a DPoP ProofJwt.boolean
-
Constructor Details
-
DPoPAuthenticationProvider
public DPoPAuthenticationProvider(org.springframework.security.authentication.AuthenticationManager tokenAuthenticationManager) Constructs aDPoPAuthenticationProviderusing the provided parameters.- Parameters:
tokenAuthenticationManager- theAuthenticationManagerused to authenticate the DPoP-bound access token
-
-
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
-
setDPoPProofVerifierFactory
public void setDPoPProofVerifierFactory(org.springframework.security.oauth2.jwt.JwtDecoderFactory<org.springframework.security.oauth2.jwt.DPoPProofContext> dPoPProofVerifierFactory) Sets theJwtDecoderFactorythat provides aJwtDecoderfor the specifiedDPoPProofContextand is used for authenticating a DPoP ProofJwt. The default factory isDPoPProofJwtDecoderFactory.- Parameters:
dPoPProofVerifierFactory- theJwtDecoderFactorythat provides aJwtDecoderfor the specifiedDPoPProofContext
-