Interface TokenBroker

All Known Implementing Classes:
JWTBroker, RSAKeyPairJWTBroker, SymmetricKeyJWTBroker

public interface TokenBroker
A broker for generating and verifying tokens.
  • Method Details

    • supportsGrantType

      boolean supportsGrantType(String grantType)
    • supportsRequestedTokenType

      boolean supportsRequestedTokenType(org.apache.polaris.service.types.TokenType tokenType)
    • generateFromClientSecrets

      TokenResponse generateFromClientSecrets(String clientId, String clientSecret, String grantType, String scope, org.apache.polaris.service.types.TokenType requestedTokenType)
      Generate a token from client secrets
      Returns:
      the response indicating an error or the requested token
    • generateFromToken

      TokenResponse generateFromToken(org.apache.polaris.service.types.TokenType subjectTokenType, String subjectToken, String grantType, String scope, org.apache.polaris.service.types.TokenType requestedTokenType)
      Generate a token from an existing token of a specified type
      Returns:
      the response indicating an error or the requested token
    • verify

      PolarisCredential verify(String token)
      Decodes and verifies the token, then returns the associated PolarisCredential.