public interface PasswordAuthenticationStore extends Destroyable
Authenticator and PasswordAuthentication.| Modifier and Type | Field and Description |
|---|---|
static PasswordAuthenticationStore |
NOP
A password store that discards all data stored in it.
|
| Modifier and Type | Method and Description |
|---|---|
char[] |
getPassword(String key,
String userName) |
String |
getUserName(String key) |
void |
put(String key,
String userName)
Updates the userName and removes the password for the given key.
|
void |
put(String key,
String userName,
char[] password)
Updates the userName and the password for the given key.
|
void |
remove(String key)
Removes both the user name and the password for the given key.
|
destroy, isDestroyedstatic final PasswordAuthenticationStore NOP
@Nullable String getUserName(String key)
put userName for the
key, or null if a user name for the given key is not in this store@Nullable char[] getPassword(String key, String userName)
userName - Must equal the userName provided with put(String, String, char[])put password for the
key, or null if a password for the given key is not in this store;
the caller is responsible for clearing the returned char[]void put(String key, String userName) throws IOException
IOExceptionvoid put(String key, String userName, char[] password) throws IOException
This method clears the password character array before it returns.
IOExceptionvoid remove(String key) throws IOException
IOExceptionCopyright © 2018 Arno Unkrig. All rights reserved.