接口 TokenManager

所有已知实现类:
CachedJwtTokenManager, JwtTokenManager, TokenManagerDelegate

public interface TokenManager
Token Manager Interface.
作者:
majorhe
  • 方法详细资料

    • createToken

      String createToken(org.springframework.security.core.Authentication authentication) throws AccessException
      Create token.
      参数:
      authentication - auth info
      返回:
      token
      抛出:
      AccessException - access exception
    • createToken

      String createToken(String userName) throws AccessException
      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

      void validateToken(String token) throws AccessException
      validate token.
      参数:
      token - token
      抛出:
      AccessException - access exception
    • parseToken

      NacosUser parseToken(String token) throws AccessException
      parse token.
      参数:
      token - token
      返回:
      nacos user object
      抛出:
      AccessException - access exception
    • getTokenValidityInSeconds

      long getTokenValidityInSeconds() throws AccessException
      validate token.
      返回:
      token validity in seconds
      抛出:
      AccessException - access exception
    • getTokenTtlInSeconds

      long getTokenTtlInSeconds(String token) throws AccessException
      validate token.
      参数:
      token - token
      返回:
      token ttl in seconds
      抛出:
      AccessException - access exception