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.