Interface JwtService

All Known Implementing Classes:
JwtServiceImpl

public interface JwtService
  • Method Details

    • getClaims

      io.jsonwebtoken.Claims getClaims(String token)
      Gets the claims associated with a token. See JwtParser.parseClaimsJws(String) for more detailed exception information.
      Parameters:
      token - the jwt token
      Returns:
      the Claims. Never null.
      Throws:
      io.jsonwebtoken.JwtException - if the token is invalid in some way (see link above)
      IllegalArgumentException - if the token is null/empty/whitespace.
    • doUserLogin

      AuthCredentials doUserLogin(User user)
      Logs a user in. Generates new authentication and refresh credentials.
      Parameters:
      user - the user to generate credentials for.
      Returns:
      a DTO containing the auth and refresh token.
    • doRefreshToken

      AuthCredentials doRefreshToken(String token)
      Refreshes a token, invalidating the refresh token.
      Parameters:
      token - the refresh token
      Returns:
      newly generated auth and refresh token
    • generateAuthStateJwt

      String generateAuthStateJwt(UserOAuthRedirectParams params)
    • decodeAuthStateJwt

      UserOAuthRedirectParams decodeAuthStateJwt(String state)