public abstract class GnomeKeyringBackedSecureStore<E extends Secret> extends Object implements SecretStore<E>
| Modifier and Type | Field and Description |
|---|---|
static String |
ALLOW_UNLOCK_KEYRING |
| Constructor and Description |
|---|
GnomeKeyringBackedSecureStore() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(String key,
E secret) |
boolean |
delete(String key) |
protected abstract E |
deserialize(String secret)
Create a
Secret from the stored string representation |
E |
get(String key)
Read a secret from GNOME Keyring using its simple password API
|
protected abstract String |
getType()
Return the type of this secure store, used to match the secret in GNOME Keyring
|
static boolean |
isGnomeKeyringSupported()
Check for GNOME Keyring support on this platform
|
boolean |
isSecure()
GNOME Keyring is considered secure
|
protected abstract String |
serialize(E secret)
Create a string representation suitable to be saved as String
|
public static final String ALLOW_UNLOCK_KEYRING
protected abstract E deserialize(String secret)
Secret from the stored string representationsecret - password, oauth2 access token, or Personal Access TokenSecret from the inputprotected abstract String serialize(E secret)
secret - password, oauth2 access token, or Personal Access Tokenprotected abstract String getType()
public E get(String key)
get in interface SecretStore<E extends Secret>key - for which a secret is associated withpublic boolean delete(String key)
delete in interface SecretStore<E extends Secret>public boolean add(String key, E secret)
add in interface SecretStore<E extends Secret>public boolean isSecure()
isSecure in interface SecretStore<E extends Secret>true for GNOME Keyringpublic static boolean isGnomeKeyringSupported()
true if gnome-keyring library is available; false otherwiseCopyright © 2018. All rights reserved.