@Component public class TokenAuthProvider extends Object implements org.springframework.security.authentication.AuthenticationProvider
AuthenticationProvider to validate JWT auth tokens. The token authentication
provider has the following responsibilities,
1. Verify and validate the access token signature. 2. Create OneOpsUser by extracting
identity and auth claims from token. 3. Throws Authentication exception if the token is invalid,
malformed or expired.
AuthenticationFailureHandler is invoked upon failed authentication.
| Constructor and Description |
|---|
TokenAuthProvider(JwtTokenService jwtTokenService) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
authenticate(org.springframework.security.core.Authentication authentication) |
boolean |
supports(Class<?> authentication) |
public TokenAuthProvider(JwtTokenService jwtTokenService)
public 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 boolean supports(Class<?> authentication)
supports in interface org.springframework.security.authentication.AuthenticationProviderCopyright © 2018 Walmart, Inc.. All rights reserved.