Package org.apache.kafka.clients.admin
Class UserScramCredentialUpsertion
- java.lang.Object
-
- org.apache.kafka.clients.admin.UserScramCredentialAlteration
-
- org.apache.kafka.clients.admin.UserScramCredentialUpsertion
-
public class UserScramCredentialUpsertion extends UserScramCredentialAlteration
A request to update/insert a SASL/SCRAM credential for a user.
-
-
Field Summary
-
Fields inherited from class org.apache.kafka.clients.admin.UserScramCredentialAlteration
user
-
-
Constructor Summary
Constructors Constructor Description UserScramCredentialUpsertion(String user, ScramCredentialInfo credentialInfo, byte[] password)
Constructor that generates a random saltUserScramCredentialUpsertion(String user, ScramCredentialInfo credentialInfo, byte[] password, byte[] salt)
Constructor that accepts an explicit saltUserScramCredentialUpsertion(String user, ScramCredentialInfo credentialInfo, String password)
Constructor that generates a random salt
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScramCredentialInfo
credentialInfo()
byte[]
password()
byte[]
salt()
-
Methods inherited from class org.apache.kafka.clients.admin.UserScramCredentialAlteration
user
-
-
-
-
Constructor Detail
-
UserScramCredentialUpsertion
public UserScramCredentialUpsertion(String user, ScramCredentialInfo credentialInfo, String password)
Constructor that generates a random salt- Parameters:
user
- the user for which the credential is to be updated/insertedcredentialInfo
- the mechanism and iterations to be usedpassword
- the password
-
UserScramCredentialUpsertion
public UserScramCredentialUpsertion(String user, ScramCredentialInfo credentialInfo, byte[] password)
Constructor that generates a random salt- Parameters:
user
- the user for which the credential is to be updated/insertedcredentialInfo
- the mechanism and iterations to be usedpassword
- the password
-
UserScramCredentialUpsertion
public UserScramCredentialUpsertion(String user, ScramCredentialInfo credentialInfo, byte[] password, byte[] salt)
Constructor that accepts an explicit salt- Parameters:
user
- the user for which the credential is to be updated/insertedcredentialInfo
- the mechanism and iterations to be usedpassword
- the passwordsalt
- the salt to be used
-
-
Method Detail
-
credentialInfo
public ScramCredentialInfo credentialInfo()
- Returns:
- the mechanism and iterations
-
salt
public byte[] salt()
- Returns:
- the salt
-
password
public byte[] password()
- Returns:
- the password
-
-