Package com.github.javakeyring.internal
Interface KeyringBackend
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
FreedesktopKeyringBackend,KWalletBackend,ModernOsxKeychainBackend,OsxKeychainBackend,WinCredentialStoreBackend
public interface KeyringBackend extends AutoCloseable
java-keyring backend interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeletePassword(String service, String account)Deletes password from keystore.StringgetPassword(String service, String account)Gets password from key store.voidsetPassword(String service, String account, String password)Sets password to key store.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
getPassword
String getPassword(String service, String account) throws PasswordAccessException
Gets password from key store.- 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
void setPassword(String service, String account, String password) throws PasswordAccessException
Sets password to key store.- Parameters:
service- Service nameaccount- Account namepassword- Password- Throws:
PasswordAccessException- Thrown when an error happened while saving the password
-
deletePassword
void deletePassword(String service, String account) throws PasswordAccessException
Deletes password from keystore.- Parameters:
service- Service nameaccount- Account name- Throws:
PasswordAccessException- Thrown when an error happened while deleting the password (including if it is not found).
-
-