Interface TokenBroker
- All Known Implementing Classes:
JWTBroker,RSAKeyPairJWTBroker,SymmetricKeyJWTBroker
public interface TokenBroker
A broker for generating and verifying tokens.
-
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 typebooleansupportsGrantType(String grantType) booleansupportsRequestedTokenType(org.apache.polaris.service.types.TokenType tokenType) Decodes and verifies the token, then returns the associatedPolarisCredential.
-
Method Details
-
supportsGrantType
-
supportsRequestedTokenType
boolean supportsRequestedTokenType(org.apache.polaris.service.types.TokenType tokenType) -
generateFromClientSecrets
TokenResponse generateFromClientSecrets(String clientId, String clientSecret, String grantType, String scope, org.apache.polaris.service.types.TokenType requestedTokenType) Generate a token from client secrets- 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- Returns:
- the response indicating an error or the requested token
-
verify
Decodes and verifies the token, then returns the associatedPolarisCredential.
-