Interface TokenBroker

All Known Implementing Classes:
JWTBroker, JWTRSAKeyPair, JWTSymmetricKeyBroker

public interface TokenBroker
Generic token class intended to be extended by different token types
  • Method Details

    • supportsGrantType

      boolean supportsGrantType(String grantType)
    • supportsRequestedTokenType

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

      @Deprecated default TokenResponse generateFromClientSecrets(String clientId, String clientSecret, String grantType, String scope, org.apache.polaris.core.PolarisCallContext polarisCallContext)
      Deprecated.
      - use the method with the requested token type
      Generate a token from client secrets without specifying the requested token type
      Parameters:
      clientId -
      clientSecret -
      grantType -
      scope -
      Returns:
      the response indicating an error or the requested token
    • generateFromClientSecrets

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

      @Deprecated default TokenResponse generateFromToken(org.apache.polaris.service.types.TokenType subjectTokenType, String subjectToken, String grantType, String scope)
      Deprecated.
      - use the method with the requested token type
      Generate a token from an existing token of a specified type without specifying the requested token type
      Parameters:
      subjectTokenType -
      subjectToken -
      grantType -
      scope -
      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
      Parameters:
      subjectTokenType -
      subjectToken -
      grantType -
      scope -
      requestedTokenType -
      Returns:
      the response indicating an error or the requested token
    • verify

      DecodedToken verify(String token)
    • findPrincipalEntity

      @Nonnull static Optional<org.apache.polaris.core.entity.PrincipalEntity> findPrincipalEntity(org.apache.polaris.core.persistence.PolarisMetaStoreManager metaStoreManager, String clientId, String clientSecret, org.apache.polaris.core.PolarisCallContext polarisCallContext)