Class KeePassHttpConnector


  • public class KeePassHttpConnector
    extends Object
    Connector for communication with a local KeePass with installed KeePassHttp-Plugin. By default, the key and id will be stored after successful association.
    Author:
    Ralf Seidengarn
    • Constructor Detail

      • KeePassHttpConnector

        public KeePassHttpConnector()
        Constructor tries to load the stored key and id
      • KeePassHttpConnector

        public KeePassHttpConnector​(int port)
        Constructor
        Parameters:
        port - port running KeePassHttp-Plugin (if different from default)
      • KeePassHttpConnector

        public KeePassHttpConnector​(String id,
                                    String key)
        Constructor with a predefined id a key, both will not be stored
        Parameters:
        id - Identifier for the client authenticated by the key as configured in the KeepassDatabase
        key - AES-Key
    • Method Detail

      • getLogins

        public List<KeePassLogin> getLogins​(String url,
                                            String submitUrl)
                                     throws KeePassHttpException
        Gets a list of logins available for the specified URL
        Parameters:
        url - URL to search for in the KeePassDatabase, by default this can also be the name of the entry in KDB
        submitUrl - optional URL
        Returns:
        a List of KeePassLogin with 0 elements if no matching login was found
        Throws:
        KeePassHttpException - exception during communication
      • getLogin

        public KeePassLogin getLogin​(String url)
                              throws KeePassHttpException
        Gets a login for the specified URL or throws an exception if it does not exist or is not uniquely identified.
        Parameters:
        url - URL to search for in the KeePassDatabase, by default this can also be the name of the entry in KDB
        Returns:
        a KeePassLogin
        Throws:
        KeePassHttpException - exception during communication or the login couldn't be found