@Component public class JwtTokenManager extends com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.event.ServerConfigChangeEvent> implements TokenManager
| 构造器和说明 |
|---|
JwtTokenManager(com.alibaba.nacos.auth.config.AuthConfigs authConfigs) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
createToken(org.springframework.security.core.Authentication authentication)
已过时。
|
String |
createToken(String userName)
Create token.
|
org.springframework.security.core.Authentication |
getAuthentication(String token)
已过时。
|
long |
getExpiredTimeInSeconds(String token) |
long |
getTokenTtlInSeconds(String token)
validate token.
|
long |
getTokenValidityInSeconds()
validate token.
|
void |
onEvent(com.alibaba.nacos.common.event.ServerConfigChangeEvent event) |
NacosUser |
parseToken(String token)
parse token.
|
Class<? extends com.alibaba.nacos.common.notify.Event> |
subscribeType() |
void |
validateToken(String token)
validate token.
|
public JwtTokenManager(com.alibaba.nacos.auth.config.AuthConfigs authConfigs)
@Deprecated public String createToken(org.springframework.security.core.Authentication authentication)
createToken 在接口中 TokenManagerauthentication - auth infopublic String createToken(String userName)
createToken 在接口中 TokenManageruserName - auth info@Deprecated public org.springframework.security.core.Authentication getAuthentication(String token) throws AccessException
getAuthentication 在接口中 TokenManagertoken - tokenAccessException - access exceptionpublic void validateToken(String token) throws AccessException
validateToken 在接口中 TokenManagertoken - tokenAccessException - access exceptionpublic NacosUser parseToken(String token) throws AccessException
TokenManagerparseToken 在接口中 TokenManagertoken - tokenAccessException - access exceptionpublic long getTokenValidityInSeconds()
TokenManagergetTokenValidityInSeconds 在接口中 TokenManagerpublic long getTokenTtlInSeconds(String token) throws AccessException
TokenManagergetTokenTtlInSeconds 在接口中 TokenManagertoken - tokenAccessException - access exceptionpublic long getExpiredTimeInSeconds(String token) throws AccessException
AccessExceptionpublic void onEvent(com.alibaba.nacos.common.event.ServerConfigChangeEvent event)
onEvent 在类中 com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.event.ServerConfigChangeEvent>public Class<? extends com.alibaba.nacos.common.notify.Event> subscribeType()
subscribeType 在类中 com.alibaba.nacos.common.notify.listener.Subscriber<com.alibaba.nacos.common.event.ServerConfigChangeEvent>Copyright © 2018–2023 Alibaba Group. All rights reserved.