@Service(value="blJWTTokenService") @ConditionalOnProperty(name="blc.auth.jwt.enabled") public class JWTTokenServiceImpl extends Object implements JWTTokenService
| Modifier and Type | Field and Description |
|---|---|
protected org.springframework.core.env.Environment |
environment |
| Constructor and Description |
|---|
JWTTokenServiceImpl(org.springframework.core.env.Environment environment) |
| Modifier and Type | Method and Description |
|---|---|
String |
generateAuthenticationToken(Long userId,
String username,
boolean isCrossAppAuth,
String commaSeparatedAuthorities)
This method is responsible for taking the token subject and generating the correct JWT authentication token.
|
String |
generateCustomerToken(Long customerId) |
String |
generateRefreshToken(Long userId,
String username,
boolean isCrossAppAuth,
String commaSeparatedAuthorities) |
protected String |
getAuthenticationSecret() |
protected Long |
getAuthenticationTokenExpirationTime() |
protected String |
getCustomerSecret() |
protected Long |
getCustomerTokenExpirationTime() |
protected String |
getRefreshSecret() |
protected Long |
getRefreshTokenExpirationTime() |
JWTUserDTO |
parseAuthenticationToken(String token) |
Long |
parseCustomerToken(String customerToken) |
JWTUserDTO |
parseRefreshToken(String token) |
protected JWTUserDTO |
parseTokenUsingSecret(String token,
String secret) |
@Autowired public JWTTokenServiceImpl(org.springframework.core.env.Environment environment)
public JWTUserDTO parseAuthenticationToken(String token) throws io.jsonwebtoken.ExpiredJwtException
parseAuthenticationToken in interface JWTTokenServiceio.jsonwebtoken.ExpiredJwtExceptionpublic JWTUserDTO parseRefreshToken(String token) throws io.jsonwebtoken.ExpiredJwtException
parseRefreshToken in interface JWTTokenServiceio.jsonwebtoken.ExpiredJwtExceptionprotected JWTUserDTO parseTokenUsingSecret(String token, String secret) throws io.jsonwebtoken.ExpiredJwtException
io.jsonwebtoken.ExpiredJwtExceptionpublic String generateAuthenticationToken(Long userId, String username, boolean isCrossAppAuth, String commaSeparatedAuthorities)
generateAuthenticationToken in interface JWTTokenServicepublic String generateRefreshToken(Long userId, String username, boolean isCrossAppAuth, String commaSeparatedAuthorities)
generateRefreshToken in interface JWTTokenServicepublic Long parseCustomerToken(String customerToken)
parseCustomerToken in interface JWTTokenServicepublic String generateCustomerToken(Long customerId)
generateCustomerToken in interface JWTTokenServiceprotected Long getAuthenticationTokenExpirationTime()
protected String getAuthenticationSecret()
protected Long getRefreshTokenExpirationTime()
protected String getRefreshSecret()
protected Long getCustomerTokenExpirationTime()
protected String getCustomerSecret()
Copyright © 2017. All rights reserved.