Package com.aresstack.keepassrpc.client
Interface KeePassRpcCredentialClient
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DefaultKeePassRpcCredentialClient
Credential access API for an already paired KeePassRPC connection.
Implementations connect to KeePassRPC using a previously persisted SRP key.
Callers should use try-with-resources or call close() explicitly.
-
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new login entry to KeePass.voidclose()Close the underlying WebSocket connection.voidconnect()Open the WebSocket connection and authenticate with KeePassRPC.Query the filename of the active KeePass database.getPassword(String entryTitle) Read the password for the first KeePass entry matching the given title.getUserName(String entryTitle) Read the username for the first KeePass entry matching the given title.Return a textual representation of entries visible through KeePassRPC.voidupdateLogin(String title, String userName, String password) Update an existing login entry by title.
-
Method Details
-
connect
void connect()Open the WebSocket connection and authenticate with KeePassRPC. -
getUserName
Read the username for the first KeePass entry matching the given title.- Parameters:
entryTitle- KeePass entry title- Returns:
- username or
nullif no matching entry was found
-
getPassword
Read the password for the first KeePass entry matching the given title.- Parameters:
entryTitle- KeePass entry title- Returns:
- password or
nullif no matching entry was found
-
getDatabaseFileName
String getDatabaseFileName()Query the filename of the active KeePass database.- Returns:
- database filename or an empty string if KeePassRPC does not return it
-
addLogin
Add a new login entry to KeePass.- Parameters:
title- entry titleuserName- usernamepassword- passwordurl- associated URL
-
updateLogin
Update an existing login entry by title.- Parameters:
title- entry titleuserName- new usernamepassword- new password
-
listEntries
String listEntries()Return a textual representation of entries visible through KeePassRPC.- Returns:
- implementation-specific entry listing
-
close
void close()Close the underlying WebSocket connection.- Specified by:
closein interfaceAutoCloseable
-