Class JWTBroker
java.lang.Object
org.apache.polaris.service.auth.internal.broker.JWTBroker
- All Implemented Interfaces:
TokenBroker
- Direct Known Subclasses:
RSAKeyPairJWTBroker,SymmetricKeyJWTBroker
Generates a JWT Token.
-
Method Summary
Modifier and TypeMethodDescriptiongenerateFromClientSecrets(String clientId, String clientSecret, String grantType, String scope, 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) Decodes and verifies the token, then returns the associatedPolarisCredential.
-
Method Details
-
getAlgorithm
public abstract com.auth0.jwt.algorithms.Algorithm getAlgorithm() -
verify
Description copied from interface:TokenBrokerDecodes and verifies the token, then returns the associatedPolarisCredential.- 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- 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:TokenBrokerGenerate a token from client secrets- Specified by:
generateFromClientSecretsin interfaceTokenBroker- 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
-