Package io.strimzi.kafka.oauth.services
Class Credentials
java.lang.Object
io.strimzi.kafka.oauth.services.Credentials
A mechanism for OAuth over PLAIN to associate credentials with the PlainSaslServer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstoreCredentials(String clientId, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Store credentials to communicate them from PLAIN callback handler to OAuthKafkaPrincipalBuilder when OAuth over PLAIN is used.org.apache.kafka.common.security.auth.KafkaPrincipaltakeCredentials(String clientId) Take credentials in order to associate them with PlainSaslServer
-
Constructor Details
-
Credentials
public Credentials()
-
-
Method Details
-
storeCredentials
public void storeCredentials(String clientId, org.apache.kafka.common.security.auth.KafkaPrincipal principal) Store credentials to communicate them from PLAIN callback handler to OAuthKafkaPrincipalBuilder when OAuth over PLAIN is used.- Parameters:
clientId- A clientId as passed to the 'username' parameter of SASL/PLAIN mechanismprincipal- The OAuthKafkaPrincipal containing the validated token
-
takeCredentials
Take credentials in order to associate them with PlainSaslServer- Parameters:
clientId- A clientId as passed to the 'username' parameter of SASL/PLAIN mechanism- Returns:
- Stored OAuthKafkaPrincipal
-