java.lang.Object
org.apache.polaris.service.auth.internal.broker.JWTBroker
All Implemented Interfaces:
TokenBroker
Direct Known Subclasses:
RSAKeyPairJWTBroker, SymmetricKeyJWTBroker

public abstract class JWTBroker extends Object implements TokenBroker
Generates a JWT Token.
  • Method Details

    • getAlgorithm

      public abstract com.auth0.jwt.algorithms.Algorithm getAlgorithm()
    • verify

      public PolarisCredential verify(String token)
      Description copied from interface: TokenBroker
      Decodes and verifies the token, then returns the associated PolarisCredential.
      Specified by:
      verify in interface TokenBroker
    • generateFromToken

      public TokenResponse generateFromToken(org.apache.polaris.service.types.TokenType subjectTokenType, String subjectToken, String grantType, String scope, org.apache.polaris.service.types.TokenType requestedTokenType)
      Description copied from interface: TokenBroker
      Generate a token from an existing token of a specified type
      Specified by:
      generateFromToken in interface TokenBroker
      Returns:
      the response indicating an error or the requested token
    • generateFromClientSecrets

      public TokenResponse generateFromClientSecrets(String clientId, String clientSecret, String grantType, String scope, org.apache.polaris.service.types.TokenType requestedTokenType)
      Description copied from interface: TokenBroker
      Generate a token from client secrets
      Specified by:
      generateFromClientSecrets in interface TokenBroker
      Returns:
      the response indicating an error or the requested token
    • supportsGrantType

      public boolean supportsGrantType(String grantType)
      Specified by:
      supportsGrantType in interface TokenBroker
    • supportsRequestedTokenType

      public boolean supportsRequestedTokenType(org.apache.polaris.service.types.TokenType tokenType)
      Specified by:
      supportsRequestedTokenType in interface TokenBroker