Class KWalletBackend
- java.lang.Object
-
- com.github.javakeyring.internal.kde.KWalletBackend
-
- All Implemented Interfaces:
KeyringBackend,AutoCloseable
public class KWalletBackend extends Object implements KeyringBackend
-
-
Constructor Summary
Constructors Constructor Description KWalletBackend()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddeletePassword(String service, String account)Removes a password from KWallet.StringgetPassword(String service, String account)Retrieves password from KWallet.voidsetPassword(String service, String account, String password)Sets password to key store.
-
-
-
Constructor Detail
-
KWalletBackend
public KWalletBackend() throws BackendNotSupportedException- Throws:
BackendNotSupportedException
-
-
Method Detail
-
getPassword
public String getPassword(String service, String account) throws PasswordAccessException
Retrieves password from KWallet.- Specified by:
getPasswordin interfaceKeyringBackend- Parameters:
service- Service nameaccount- Account name- Returns:
- Stored password
- Throws:
PasswordAccessException- when the password cannot be found
-
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
public void deletePassword(String service, String account) throws PasswordAccessException
Removes a password from KWallet.- Specified by:
deletePasswordin interfaceKeyringBackend- Parameters:
service- Service nameaccount- Account name- Throws:
PasswordAccessException- when password is not in wallet
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
-