Interface JwtService

All Known Implementing Classes:
JwtServiceImpl

public interface JwtService
Javascript Web Token Services interface.
  • Method Details

    • validateAuthentication

      WalletAuthenticationJwtImpl validateAuthentication(String jwt)
      Check if the given javascript web token is valid.
      Parameters:
      jwt - valid signed JWT.
      Returns:
      a spring authentication token if valid, null in other case
      Throws:
      InvalidCredentialsException - if the token can not be validated.
    • createJwtFromSpec

      String createJwtFromSpec(JwtBearerToken token)
      Create a new JWT.
      Parameters:
      token - JWT details. The token ID, if missing, is generated (UUID).
      Returns:
      a new signed JWT.
      Throws:
      InvalidCallException - if the token can not be created due to invalid argument data.
      UnexpectedException - if the token can not be created due to an unexpected error condition.