Package org.apache.polaris.service.auth
Class JWTBroker
java.lang.Object
org.apache.polaris.service.auth.JWTBroker
- All Implemented Interfaces:
TokenBroker
- Direct Known Subclasses:
JWTRSAKeyPair,JWTSymmetricKeyBroker
Generates a JWT Token.
-
Method Summary
Modifier and TypeMethodDescriptiongenerateFromClientSecrets(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 secretsgenerateFromToken(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 typeabstract com.auth0.jwt.algorithms.AlgorithmbooleansupportsGrantType(String grantType) booleansupportsRequestedTokenType(org.apache.polaris.service.types.TokenType tokenType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.polaris.service.auth.TokenBroker
generateFromClientSecrets, generateFromToken
-
Method Details
-
getAlgorithm
public abstract com.auth0.jwt.algorithms.Algorithm getAlgorithm() -
verify
- Specified by:
verifyin interfaceTokenBroker
-
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:TokenBrokerGenerate a token from an existing token of a specified type- Specified by:
generateFromTokenin interfaceTokenBroker- Parameters:
subjectTokenType-subjectToken-grantType-scope-requestedTokenType-- 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.core.PolarisCallContext polarisCallContext, org.apache.polaris.service.types.TokenType requestedTokenType) Description copied from interface:TokenBrokerGenerate a token from client secrets- Specified by:
generateFromClientSecretsin interfaceTokenBroker- Parameters:
clientId-clientSecret-grantType-scope-requestedTokenType-- Returns:
- the response indicating an error or the requested token
-
supportsGrantType
- Specified by:
supportsGrantTypein interfaceTokenBroker
-
supportsRequestedTokenType
public boolean supportsRequestedTokenType(org.apache.polaris.service.types.TokenType tokenType) - Specified by:
supportsRequestedTokenTypein interfaceTokenBroker
-