public class JwtAuthenticationProvider
extends java.lang.Object
implements org.springframework.security.authentication.AuthenticationProvider
| Constructor and Description |
|---|
JwtAuthenticationProvider(byte[] secret,
java.lang.String issuer,
java.lang.String audience) |
JwtAuthenticationProvider(com.auth0.jwk.JwkProvider jwkProvider,
java.lang.String issuer,
java.lang.String audience) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
boolean |
supports(java.lang.Class<?> authentication) |
JwtAuthenticationProvider |
withJwtVerifierLeeway(long leeway)
Allow a leeway to use on the JWT verification.
|
public JwtAuthenticationProvider(byte[] secret,
java.lang.String issuer,
java.lang.String audience)
public JwtAuthenticationProvider(com.auth0.jwk.JwkProvider jwkProvider,
java.lang.String issuer,
java.lang.String audience)
public boolean supports(java.lang.Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProviderpublic org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
authenticate in interface org.springframework.security.authentication.AuthenticationProviderorg.springframework.security.core.AuthenticationExceptionpublic JwtAuthenticationProvider withJwtVerifierLeeway(long leeway)
leeway - the leeway value to use expressed in seconds.