Package org.jdesktop.swingx.auth
Class PasswordStore
java.lang.Object
org.jdesktop.swingx.auth.PasswordStore
PasswordStore specifies a mechanism to store passwords used to authenticate
using the LoginService. The actual mechanism used
to store the passwords is left up to the implementation.
- Author:
- Bino George, Jonathan Giles
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract char[]Fetches the password for a given server and username.abstract voidremoveUserPassword(String username) This should attempt to remove the given username from the password store, as well as any associated password.abstract booleanSaves a password for future use.
-
Constructor Details
-
PasswordStore
public PasswordStore()
-
-
Method Details
-
set
Saves a password for future use.- Parameters:
username- username used to authenticate.server- server used for authenticationpassword- password to save. Password can't be null. Use empty array for empty password.
-
get
Fetches the password for a given server and username.- Parameters:
username- usernameserver- server- Returns:
nullif not found, a character array representing the password otherwise. Returned array can be empty if the password is empty.
-
removeUserPassword
This should attempt to remove the given username from the password store, as well as any associated password.- Parameters:
username- The username to remove
-