接口 TokenManager
public interface TokenManager
Token Manager Interface.
- 作者:
- majorhe
-
方法概要
修饰符和类型方法说明createToken(String userName) Create token.createToken(org.springframework.security.core.Authentication authentication) Create token.org.springframework.security.core.AuthenticationgetAuthentication(String token) Get auth Info.longgetTokenTtlInSeconds(String token) validate token.longvalidate token.parseToken(String token) parse token.voidvalidateToken(String token) validate token.
-
方法详细资料
-
createToken
String createToken(org.springframework.security.core.Authentication authentication) throws AccessException Create token.- 参数:
authentication- auth info- 返回:
- token
- 抛出:
AccessException- access exception
-
createToken
Create token.- 参数:
userName- auth info- 返回:
- token
- 抛出:
AccessException- access exception
-
getAuthentication
org.springframework.security.core.Authentication getAuthentication(String token) throws AccessException Get auth Info.- 参数:
token- token- 返回:
- auth info
- 抛出:
AccessException- access exception
-
validateToken
validate token.- 参数:
token- token- 抛出:
AccessException- access exception
-
parseToken
parse token.- 参数:
token- token- 返回:
- nacos user object
- 抛出:
AccessException- access exception
-
getTokenValidityInSeconds
validate token.- 返回:
- token validity in seconds
- 抛出:
AccessException- access exception
-
getTokenTtlInSeconds
validate token.- 参数:
token- token- 返回:
- token ttl in seconds
- 抛出:
AccessException- access exception
-