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:
configure
in interfaceorg.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable
-
validate
Description copied from interface:JwtValidator
Accepts an OAuth JWT access token in base-64 encoded format, validates, and returns an OAuthBearerToken.- Specified by:
validate
in interfaceJwtValidator
- Parameters:
accessToken
- Non-null
JWT access token- Returns:
OAuthBearerToken
- Throws:
JwtValidatorException
- Thrown on errors performing validation of given token
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.apache.kafka.common.security.oauthbearer.internals.secured.OAuthBearerConfigurable
- Throws:
IOException
-