public interface TokenManager
| 限定符和类型 | 方法和说明 |
|---|---|
String |
createToken(org.springframework.security.core.Authentication authentication)
Create token.
|
String |
createToken(String userName)
Create token.
|
org.springframework.security.core.Authentication |
getAuthentication(String token)
Get auth Info.
|
long |
getTokenTtlInSeconds(String token)
validate token.
|
long |
getTokenValidityInSeconds()
validate token.
|
NacosUser |
parseToken(String token)
parse token.
|
void |
validateToken(String token)
validate token.
|
String createToken(org.springframework.security.core.Authentication authentication) throws AccessException
authentication - auth infoAccessException - access exceptionString createToken(String userName) throws AccessException
userName - auth infoAccessException - access exceptionorg.springframework.security.core.Authentication getAuthentication(String token) throws AccessException
token - tokenAccessException - access exceptionvoid validateToken(String token) throws AccessException
token - tokenAccessException - access exceptionNacosUser parseToken(String token) throws AccessException
token - tokenAccessException - access exceptionlong getTokenValidityInSeconds()
throws AccessException
AccessException - access exceptionlong getTokenTtlInSeconds(String token) throws AccessException
token - tokenAccessException - access exceptionCopyright © 2018–2023 Alibaba Group. All rights reserved.