class PasswordAuthentication
The class PasswordAuthentication is a data holder that is used by Authenticator. It is simply a repository for a user name and a password.
Summary
| Public constructors |
|
Creates a new PasswordAuthentication object from the given user name and password.
|
| Public methods |
| CharArray! |
Returns the user password.
|
| String! |
Returns the user name.
|
Public constructors
PasswordAuthentication
PasswordAuthentication(
userName: String!,
password: CharArray!)
Creates a new PasswordAuthentication object from the given user name and password.
Note that the given user password is cloned before it is stored in the new PasswordAuthentication object.
| Parameters |
userName |
String!: the user name |
password |
CharArray!: the user's password |
Public methods
getPassword
fun getPassword(): CharArray!
Returns the user password.
Note that this method returns a reference to the password. It is the caller's responsibility to zero out the password information after it is no longer needed.
getUserName
fun getUserName(): String!
Returns the user name.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]