Package com.microsoft.credentialstorage
Interface SecretStore<E extends StoredSecret>
-
- Type Parameters:
E- a secret
- All Known Implementing Classes:
GnomeKeyringBackedCredentialStore,GnomeKeyringBackedSecureStore,GnomeKeyringBackedTokenPairStore,GnomeKeyringBackedTokenStore,LibSecretBackedCredentialStore,LibSecretBackedSecureStore,LibSecretBackedTokenPairStore,LibSecretBackedTokenStore
public interface SecretStore<E extends StoredSecret>Secret store to hold the credentials.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(String key, E secret)Save the secret identified by the key to this store.booleandelete(String key)Remove the secret identified by the key from this storeEget(String key)Retrieve a secret identified by the key from this store.booleanisSecure()Indicate whether this store is secure or not.
-
-
-
Method Detail
-
get
E get(String key)
Retrieve a secret identified by the key from this store. If there is no secret identified by this key, returnnull- Parameters:
key- for which a secret is associated with- Returns:
- secret stored by this key, or
null
-
delete
boolean delete(String key)
Remove the secret identified by the key from this store- Parameters:
key- for which a secret is associated with- Returns:
trueif secret is deleted successfullyfalseotherwise
-
add
boolean add(String key, E secret)
Save 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
-
isSecure
boolean isSecure()
Indicate whether this store is secure or not. Generally a secure storage is password protected, and all data maybe encrypted on disk. However this method does not assert any of those claims - it simply returns this value as an attribute of the underlying storage- Returns:
trueif the underlying storage is considered "secure"falseotherwise
-
-