@Component public class TokenManagerDelegate extends Object implements TokenManager
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
NACOS_AUTH_TOKEN_CACHING_ENABLED |
| 构造器和说明 |
|---|
TokenManagerDelegate() |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
void |
init() |
NacosUser |
parseToken(String token)
parse token.
|
void |
validateToken(String token)
validate token.
|
@PostConstruct public void init()
public String createToken(org.springframework.security.core.Authentication authentication) throws AccessException
TokenManagercreateToken 在接口中 TokenManagerauthentication - auth infoAccessException - access exceptionpublic String createToken(String userName) throws AccessException
TokenManagercreateToken 在接口中 TokenManageruserName - auth infoAccessException - access exceptionpublic org.springframework.security.core.Authentication getAuthentication(String token) throws AccessException
TokenManagergetAuthentication 在接口中 TokenManagertoken - tokenAccessException - access exceptionpublic void validateToken(String token) throws AccessException
TokenManagervalidateToken 在接口中 TokenManagertoken - tokenAccessException - access exceptionpublic NacosUser parseToken(String token) throws AccessException
TokenManagerparseToken 在接口中 TokenManagertoken - tokenAccessException - access exceptionpublic long getTokenValidityInSeconds()
throws AccessException
TokenManagergetTokenValidityInSeconds 在接口中 TokenManagerAccessException - access exceptionpublic long getTokenTtlInSeconds(String token) throws AccessException
TokenManagergetTokenTtlInSeconds 在接口中 TokenManagertoken - tokenAccessException - access exceptionCopyright © 2018–2023 Alibaba Group. All rights reserved.