PasswordCallback
open class PasswordCallback : Callback, Serializable
| kotlin.Any | |
| ↳ | javax.security.auth.callback.PasswordCallback | 
 Underlying security services instantiate and pass a PasswordCallback to the handle method of a CallbackHandler to retrieve password information.
Summary
| Public constructors | |
|---|---|
| PasswordCallback(prompt: String!, echoOn: Boolean)Construct a  | |
| Public methods | |
|---|---|
| open Unit | Clear the retrieved password. | 
| open CharArray! | Get the retrieved password. | 
| open String! | Get the prompt. | 
| open Boolean | isEchoOn()Return whether the password should be displayed as it is being typed. | 
| open Unit | setPassword(password: CharArray!)Set the retrieved password. | 
Public constructors
PasswordCallback
PasswordCallback(
prompt: String!,
echoOn: Boolean)
Construct a PasswordCallback with a prompt and a boolean specifying whether the password should be displayed as it is being typed. 
| Parameters | |
|---|---|
| prompt | String!: the prompt used to request the password. | 
| echoOn | Boolean: true if the password should be displayed as it is being typed. | 
| Exceptions | |
|---|---|
| java.lang.IllegalArgumentException | if promptis null or ifprompthas a length of 0. | 
Public methods
getPassword
open fun getPassword(): CharArray!
Get the retrieved password.
This method returns a copy of the retrieved password.
| Return | |
|---|---|
| CharArray! | the retrieved password, which may be null. | 
See Also
getPrompt
open fun getPrompt(): String!
Get the prompt.
| Return | |
|---|---|
| String! | the prompt. | 
isEchoOn
open fun isEchoOn(): Boolean
Return whether the password should be displayed as it is being typed.
| Return | |
|---|---|
| Boolean | the whether the password should be displayed as it is being typed. | 
setPassword
open fun setPassword(password: CharArray!): Unit
Set the retrieved password.
This method makes a copy of the input password before storing it.
| Parameters | |
|---|---|
| password | CharArray!: the retrieved password, which may be null. | 
See Also
