Class Credentials

java.lang.Object
io.strimzi.kafka.oauth.services.Credentials

public class Credentials extends Object
A mechanism for OAuth over PLAIN to associate credentials with the PlainSaslServer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    org.apache.kafka.common.security.auth.KafkaPrincipal
    Take credentials in order to associate them with PlainSaslServer

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 mechanism
      principal - The OAuthKafkaPrincipal containing the validated token
    • takeCredentials

      public org.apache.kafka.common.security.auth.KafkaPrincipal takeCredentials(String clientId)
      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