接口 JwtManager

所有已知实现类:
DefaultJwtManager

public interface JwtManager
  • 方法详细资料

    • createToken

      String createToken(Object object)
      Creates a new JWT for the specified object using the key from SettingsManager.
      参数:
      object - The object to create JWT.
      返回:
      A new JWT token.
      另请参阅:
    • createToken

      String createToken(Object object, String key)
      Creates a new JWT for the specified object. The key is passed as a method parameter.
      参数:
      object - The object to create JWT.
      key - The secret key value.
      返回:
      A new JWT token.
    • createToken

      String createToken(Map<String,?> payloadMap, String key)
      Creates a new JWT for the specified payload map. The key is passed as a method parameter.
      参数:
      payloadMap - The payload map to create JWT.
      key - The secret key value.
      返回:
      A new JWT token.
    • verify

      String verify(String token)
      Performs the verification against the given token using the key from SettingsManager.
      参数:
      token - The token to be verified.
      返回:
      The verified and decoded payload.
      另请参阅:
    • verifyToken

      String verifyToken(String token, String key)
      Performs the verification against the given token using the key passed as a method parameter.
      参数:
      token - The token to be verified.
      key - The secret key value.
      返回:
      The verified and decoded payload.