Class LibSecretBackedCredentialStore
- java.lang.Object
-
- com.microsoft.credentialstorage.implementation.posix.libsecret.LibSecretBackedSecureStore<StoredCredential>
-
- com.microsoft.credentialstorage.implementation.posix.libsecret.LibSecretBackedCredentialStore
-
- All Implemented Interfaces:
SecretStore<StoredCredential>
public final class LibSecretBackedCredentialStore extends LibSecretBackedSecureStore<StoredCredential>
Libsecret store for a credential.
-
-
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 LibSecretBackedCredentialStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(String key, StoredCredential secret)Save the secret identified by the key to this store.protected StoredCredentialcreate(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
-
add
public boolean add(String key, StoredCredential secret)
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 withsecret- secret to be stored- Returns:
trueif secret is added successfullyfalseotherwise
-
create
protected StoredCredential create(String username, char[] secret)
Description copied from class:LibSecretBackedSecureStoreCreate aSecretfrom the string representation- Specified by:
createin classLibSecretBackedSecureStore<StoredCredential>- Parameters:
username- username for the secretsecret- password, oauth2 access token, or Personal Access Token- Returns:
- a
Secretfrom the input
-
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<StoredCredential>- Returns:
- type string representation of the secret type
-
-