org.apache.qpid.server.security.auth.sasl.plain
Class PlainPasswordCallback
java.lang.Object
javax.security.auth.callback.PasswordCallback
org.apache.qpid.server.security.auth.sasl.plain.PlainPasswordCallback
- All Implemented Interfaces:
- Serializable, Callback
public class PlainPasswordCallback
- extends PasswordCallback
Custom PasswordCallback for use during the PLAIN authentication process.
To be used in combination with PrincipalDatabase implementations that
can either set a plain text value in the parent callback, or use the
setAuthenticated(bool) method after observing the incoming plain text.
isAuthenticated() should then be used to determine the final result.
- See Also:
- Serialized Form
Constructor Summary |
PlainPasswordCallback(String prompt,
boolean echoOn,
String plainPassword)
Constructs a new PlainPasswordCallback with the incoming plain text password. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlainPasswordCallback
public PlainPasswordCallback(String prompt,
boolean echoOn,
String plainPassword)
- Constructs a new PlainPasswordCallback with the incoming plain text password.
- Throws:
NullPointerException
- if the incoming plain text is null
getPlainPassword
public String getPlainPassword()
setAuthenticated
public void setAuthenticated(boolean authenticated)
isAuthenticated
public boolean isAuthenticated()
- Method to determine if the incoming plain password is authenticated
- Returns:
- true if the stored password matches the incoming text, or setAuthenticated(true) has been called
Licensed to the Apache Software Foundation