Package com.auth0.spring.security.api
Class JwtAuthenticationProvider
java.lang.Object
com.auth0.spring.security.api.JwtAuthenticationProvider
- All Implemented Interfaces:
org.springframework.security.authentication.AuthenticationProvider
public class JwtAuthenticationProvider
extends Object
implements org.springframework.security.authentication.AuthenticationProvider
-
Constructor Summary
ConstructorsConstructorDescriptionJwtAuthenticationProvider
(byte[] secret, String[] issuers, String audience) JwtAuthenticationProvider
(byte[] secret, String issuer, String audience) JwtAuthenticationProvider
(com.auth0.jwk.JwkProvider jwkProvider, String[] issuers, String audience) JwtAuthenticationProvider
(com.auth0.jwk.JwkProvider jwkProvider, String issuer, String audience) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authentication
authenticate
(org.springframework.security.core.Authentication authentication) boolean
withJwtVerifierLeeway
(long leeway) Allow a leeway to use on the JWT verification.
-
Constructor Details
-
JwtAuthenticationProvider
-
JwtAuthenticationProvider
-
JwtAuthenticationProvider
-
JwtAuthenticationProvider
-
-
Method Details
-
supports
- Specified by:
supports
in interfaceorg.springframework.security.authentication.AuthenticationProvider
-
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
-
withJwtVerifierLeeway
Allow a leeway to use on the JWT verification.- Parameters:
leeway
- the leeway value to use expressed in seconds.- Returns:
- this same provider instance to chain calls.
-