Class PlainAuthenticateCallback
java.lang.Object
org.apache.kafka.common.security.plain.PlainAuthenticateCallback
- All Implemented Interfaces:
Callback
public class PlainAuthenticateCallback extends Object implements Callback
-
Constructor Summary
Constructors Constructor Description PlainAuthenticateCallback(char[] password)
Creates a callback with the password provided by the client -
Method Summary
Modifier and Type Method Description boolean
authenticated()
Returns true if client password matches expected password, false otherwise.void
authenticated(boolean authenticated)
Sets the authenticated state.char[]
password()
Returns the password provided by the client during SASL/PLAIN authentication
-
Constructor Details
-
PlainAuthenticateCallback
public PlainAuthenticateCallback(char[] password)Creates a callback with the password provided by the client- Parameters:
password
- The password provided by the client during SASL/PLAIN authentication
-
-
Method Details
-
password
public char[] password()Returns the password provided by the client during SASL/PLAIN authentication -
authenticated
public boolean authenticated()Returns true if client password matches expected password, false otherwise. This state is set the server-side callback handler. -
authenticated
public void authenticated(boolean authenticated)Sets the authenticated state. This is set by the server-side callback handler by matching the client provided password with the expected password.- Parameters:
authenticated
- true indicates successful authentication
-