Class OAuthBearerLoginWithIdentityPoolCallbackHandler
java.lang.Object
io.confluent.kafkarest.auth.OAuthBearerLoginWithIdentityPoolCallbackHandler
- All Implemented Interfaces:
CallbackHandler,org.apache.kafka.common.security.auth.AuthenticateCallbackHandler
public class OAuthBearerLoginWithIdentityPoolCallbackHandler
extends Object
implements org.apache.kafka.common.security.auth.AuthenticateCallbackHandler
A
CallbackHandler that recognizes OAuthBearerTokenCallback and retrieves OAuth 2
Bearer Token that was provided via the JAAS config. It also attaches the (logical) cluster this
token is allowed to work with as a SASL extension.
For example:
KafkaClient {
org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule Required
token="Token"
logicalCluster="audi"
identityPoolId="id"
};
This class should be explicitly set via the sasl.login.callback.handler.class client
configuration property.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
OAuthBearerLoginWithIdentityPoolCallbackHandler
public OAuthBearerLoginWithIdentityPoolCallbackHandler()
-
-
Method Details
-
configure
public void configure(Map<String, ?> configs, String saslMechanism, List<AppConfigurationEntry> jaasConfigEntries) - Specified by:
configurein interfaceorg.apache.kafka.common.security.auth.AuthenticateCallbackHandler
-
handle
- Specified by:
handlein interfaceCallbackHandler- Throws:
IOExceptionUnsupportedCallbackException
-
close
public void close()- Specified by:
closein interfaceorg.apache.kafka.common.security.auth.AuthenticateCallbackHandler
-