Class LibSecretBackedTokenStore
- java.lang.Object
-
- com.microsoft.credentialstorage.implementation.posix.libsecret.LibSecretBackedSecureStore<StoredToken>
-
- com.microsoft.credentialstorage.implementation.posix.libsecret.LibSecretBackedTokenStore
-
- All Implemented Interfaces:
SecretStore<StoredToken>
public final class LibSecretBackedTokenStore extends LibSecretBackedSecureStore<StoredToken>
Libsecret store for a token.
-
-
Field Summary
-
Fields inherited from class com.microsoft.credentialstorage.implementation.posix.libsecret.LibSecretBackedSecureStore
ALLOW_UNLOCK_DEFAULT_COLLECTION, APP_NAME, ATTRIBUTE_ACCOUNT, ATTRIBUTE_KEY, ATTRIBUTE_TYPE, INSTANCE, logger, SCHEMA
-
-
Constructor Summary
Constructors Constructor Description LibSecretBackedTokenStore()
-
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 Libsecret-
Methods inherited from class com.microsoft.credentialstorage.implementation.posix.libsecret.LibSecretBackedSecureStore
checkResult, delete, deleteSecret, get, isLibSecretSupported, isSecure, isSupported, readSecret, writeSecret
-
-
-
-
Method Detail
-
create
protected StoredToken create(String username, char[] secret)
Description copied from class:LibSecretBackedSecureStoreCreate aSecretfrom the string representation- Specified by:
createin classLibSecretBackedSecureStore<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:LibSecretBackedSecureStoreReturn the type of this secure store, used to match the secret in Libsecret- Specified by:
getTypein classLibSecretBackedSecureStore<StoredToken>- Returns:
- type string representation of the secret type
-
-