Name
PasswordCallback
Synopsis
This
Callback
class
represents a request for a password. A
CallbackHandler
should handle it by displaying the
prompt returned by getPrompt( )
and then allowing
the user the enter a password. When the user has entered the
password, it should pass the entered text to setPassword(
)
. If isEchoOn(
)
returns true, then the Handler
should
display the password as the user types it.
Figure 19-10. javax.security.auth.callback.PasswordCallback
public class PasswordCallback implements Callback, Serializable { // Public Constructors public PasswordCallback(String prompt, boolean echoOn); // Public Instance Methods public void clearPassword( ); public char[ ] getPassword( ); public String getPrompt( ); public boolean isEchoOn( ); public void setPassword(char[ ] password); }
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.