Package org.jdesktop.swingx.auth
Class PasswordStore
- java.lang.Object
-
- org.jdesktop.swingx.auth.PasswordStore
-
public abstract class PasswordStore extends java.lang.Object
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.
-
-
Constructor Summary
Constructors Constructor Description PasswordStore()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract char[]
get(java.lang.String username, java.lang.String server)
Fetches the password for a given server and username.abstract boolean
set(java.lang.String username, java.lang.String server, char[] password)
Saves a password for future use.
-
-
-
Method Detail
-
set
public abstract boolean set(java.lang.String username, java.lang.String server, char[] password)
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
public abstract char[] get(java.lang.String username, java.lang.String server)
Fetches the password for a given server and username.- Parameters:
username
- usernameserver
- server- Returns:
null
if not found, a character array representing the password otherwise. Returned array can be empty if the password is empty.
-
-