Interface KeePassRpcCredentialClient

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
DefaultKeePassRpcCredentialClient

public interface KeePassRpcCredentialClient extends AutoCloseable
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 Type
    Method
    Description
    void
    addLogin(String title, String userName, String password, String url)
    Add a new login entry to KeePass.
    void
    Close the underlying WebSocket connection.
    void
    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.
    void
    updateLogin(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

      String getUserName(String entryTitle)
      Read the username for the first KeePass entry matching the given title.
      Parameters:
      entryTitle - KeePass entry title
      Returns:
      username or null if no matching entry was found
    • getPassword

      String getPassword(String entryTitle)
      Read the password for the first KeePass entry matching the given title.
      Parameters:
      entryTitle - KeePass entry title
      Returns:
      password or null if 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

      void addLogin(String title, String userName, String password, String url)
      Add a new login entry to KeePass.
      Parameters:
      title - entry title
      userName - username
      password - password
      url - associated URL
    • updateLogin

      void updateLogin(String title, String userName, String password)
      Update an existing login entry by title.
      Parameters:
      title - entry title
      userName - new username
      password - 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:
      close in interface AutoCloseable