public class TokenBearerValidatorCallbackHandler extends Object implements org.apache.kafka.common.security.auth.AuthenticateCallbackHandler
CallbackHandler that recognizes
TokenBearerValidatorCallbackHandler
for validating a Authentication Tokens issued by Confluent.
It verifies the signature of a JWT through a public key it reads from a file path, set in the JAAS config.
This class must be explicitly set via the
listener.name.sasl_[plaintext|ssl].oauthbearer.sasl.server.callback.handler.class
broker configuration property.
| Constructor and Description |
|---|
TokenBearerValidatorCallbackHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(Map<String,?> configs,
String saslMechanism,
List<AppConfigurationEntry> jaasConfigEntries) |
void |
handle(Callback[] callbacks) |
public void configure(Map<String,?> configs, String saslMechanism, List<AppConfigurationEntry> jaasConfigEntries)
configure in interface org.apache.kafka.common.security.auth.AuthenticateCallbackHandlerpublic void handle(Callback[] callbacks) throws UnsupportedCallbackException
handle in interface CallbackHandlerUnsupportedCallbackExceptionpublic void close()
close in interface org.apache.kafka.common.security.auth.AuthenticateCallbackHandler