Class DefaultJwtValidator
java.lang.Object
org.apache.kafka.common.security.oauthbearer.DefaultJwtValidator
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable,JwtValidator
This
JwtValidator uses the delegation approach, instantiating and delegating calls to a
more concrete implementation. The underlying implementation is determined by the presence/absence
of the VerificationKeyResolver: if it's present, a BrokerJwtValidator is
created, otherwise a ClientJwtValidator is created.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJwtValidator(org.apache.kafka.common.security.oauthbearer.internals.secured.CloseableVerificationKeyResolver verificationKeyResolver) -
Method Summary
-
Constructor Details
-
DefaultJwtValidator
public DefaultJwtValidator() -
DefaultJwtValidator
public DefaultJwtValidator(org.apache.kafka.common.security.oauthbearer.internals.secured.CloseableVerificationKeyResolver verificationKeyResolver)
-
-
Method Details
-
configure
public void configure(Map<String, ?> configs, String saslMechanism, List<AppConfigurationEntry> jaasConfigEntries) - Specified by:
configurein interfaceorg.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable
-
validate
Description copied from interface:JwtValidatorAccepts an OAuth JWT access token in base-64 encoded format, validates, and returns an OAuthBearerToken.- Specified by:
validatein interfaceJwtValidator- Parameters:
accessToken- Non-nullJWT access token- Returns:
OAuthBearerToken- Throws:
JwtValidatorException- Thrown on errors performing validation of given token
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable- Throws:
IOException
-