Class WinCredentialStoreBackend
java.lang.Object
com.github.javakeyring.internal.windows.WinCredentialStoreBackend
- All Implemented Interfaces:
KeyringBackend,AutoCloseable
A Windows "Credential Store" backend.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddeletePassword(String service, String account) Deletes password from keystore.getPassword(String service, String account) Gets password from key store.voidsetPassword(String service, String account, String password) Sets password to key store.
-
Constructor Details
-
WinCredentialStoreBackend
- Throws:
BackendNotSupportedException
-
-
Method Details
-
getPassword
Description copied from interface:KeyringBackendGets password from key store.- Specified by:
getPasswordin interfaceKeyringBackend- Parameters:
service- Service nameaccount- Account name- Returns:
- Password related to specified service and account
- Throws:
PasswordAccessException- Thrown when an error happened while getting password
-
setPassword
public void setPassword(String service, String account, String password) throws PasswordAccessException Description copied from interface:KeyringBackendSets password to key store.- Specified by:
setPasswordin interfaceKeyringBackend- Parameters:
service- Service nameaccount- Account namepassword- Password- Throws:
PasswordAccessException- Thrown when an error happened while saving the password
-
deletePassword
Description copied from interface:KeyringBackendDeletes password from keystore.- Specified by:
deletePasswordin interfaceKeyringBackend- Parameters:
service- Service nameaccount- Account name- Throws:
PasswordAccessException- Thrown when an error happened while deleting the password (including if it is not found).
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-