Class GnomeKeyringBackedTokenStore
- java.lang.Object
-
- com.microsoft.credentialstorage.implementation.posix.keyring.GnomeKeyringBackedSecureStore<StoredToken>
-
- com.microsoft.credentialstorage.implementation.posix.keyring.GnomeKeyringBackedTokenStore
-
- All Implemented Interfaces:
SecretStore<StoredToken>
public final class GnomeKeyringBackedTokenStore extends GnomeKeyringBackedSecureStore<StoredToken>
GNOME Keyring store for a token.
-
-
Field Summary
-
Fields inherited from class com.microsoft.credentialstorage.implementation.posix.keyring.GnomeKeyringBackedSecureStore
ALLOW_UNLOCK_KEYRING, APP_NAME, ATTRIBUTE_ACCOUNT, ATTRIBUTE_KEY, ATTRIBUTE_TYPE, INSTANCE, logger, SCHEMA
-
-
Constructor Summary
Constructors Constructor Description GnomeKeyringBackedTokenStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(String key, StoredToken token)Save the secret identified by the key to this store.protected StoredTokencreate(String username, char[] secret)Create aSecretfrom the string representationprotected StringgetType()Return the type of this secure store, used to match the secret in GNOME Keyring-
Methods inherited from class com.microsoft.credentialstorage.implementation.posix.keyring.GnomeKeyringBackedSecureStore
checkResult, delete, deleteSecret, get, isSecure, isSupported, readSecret, writeSecret
-
-
-
-
Method Detail
-
create
protected StoredToken create(String username, char[] secret)
Description copied from class:GnomeKeyringBackedSecureStoreCreate aSecretfrom the string representation- Specified by:
createin classGnomeKeyringBackedSecureStore<StoredToken>- Parameters:
username- username for the secretsecret- password, oauth2 access token, or Personal Access Token- Returns:
- a
Secretfrom the input
-
add
public boolean add(String key, StoredToken token)
Description copied from interface:SecretStoreSave the secret identified by the key to this store. Replace existing secret if it exists.- Parameters:
key- for which a secret is associated withtoken- secret to be stored- Returns:
trueif secret is added successfullyfalseotherwise
-
getType
protected String getType()
Description copied from class:GnomeKeyringBackedSecureStoreReturn the type of this secure store, used to match the secret in GNOME Keyring- Specified by:
getTypein classGnomeKeyringBackedSecureStore<StoredToken>- Returns:
- type string representation of the secret type
-
-