Package org.apache.polaris.service.auth
Interface TokenBroker
- All Known Implementing Classes:
JWTBroker,JWTRSAKeyPair,JWTSymmetricKeyBroker
public interface TokenBroker
Generic token class intended to be extended by different token types
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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) default TokenResponsegenerateFromClientSecrets(String clientId, String clientSecret, String grantType, String scope, org.apache.polaris.core.PolarisCallContext polarisCallContext) Deprecated.- use the method with the requested token typegenerateFromClientSecrets(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 secretsdefault TokenResponsegenerateFromToken(org.apache.polaris.service.types.TokenType subjectTokenType, String subjectToken, String grantType, String scope) Deprecated.- use the method with the requested token typegenerateFromToken(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 typebooleansupportsGrantType(String grantType) booleansupportsRequestedTokenType(org.apache.polaris.service.types.TokenType tokenType)
-
Method Details
-
supportsGrantType
-
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 typeGenerate 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 typeGenerate 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
-
findPrincipalEntity
-