Class SimpleUserInfo

  • All Implemented Interfaces:
    UserInfo

    public class SimpleUserInfo
    extends Object
    implements UserInfo
    A simple UserInfo implementation that always returns the same passphrase and password. It will not show any messages, and promptYesNo(String) will always return false. That means that it will not prompt if the authenticity of a host cannot be established, but will automatically answer the question with "no". Make sure to use a HostKeyRepository that can verify the host automatically.
    Author:
    Rob Spoor
    • Constructor Detail

      • SimpleUserInfo

        public SimpleUserInfo​(char[] password)
        Creates a new SimpleUserInfo object with no passphrase.
        Parameters:
        password - The password to use.
        Throws:
        NullPointerException - If the password is null.
      • SimpleUserInfo

        public SimpleUserInfo​(String passphrase,
                              char[] password)
        Creates a new SimpleUserInfo object.
        Parameters:
        passphrase - The passphrase to use.
        password - The password to use.
        Throws:
        NullPointerException - If the password is null.