Interface PromptUserPassword3

    • Method Detail

      • prompt

        boolean prompt​(java.lang.String realm,
                       java.lang.String username,
                       boolean maySave)
        Request a user name and password from the user, and (usually) store the auth credential caching preference specified by maySave (used by userAllowedSave()). Applications wanting to emulate the behavior of --non-interactive will implement this method in a manner which does not require user interaction (e.g. a no-op which assumes pre-cached auth credentials).
        Parameters:
        realm - The realm from which the question originates.
        username - The name of the user in realm.
        maySave - Whether caching of credentials is allowed. Usually affects the return value of the userAllowedSave() method.
        Returns:
        Whether the prompt for authentication credentials was successful (e.g. in a GUI application whether the dialog box was canceled).
      • askQuestion

        java.lang.String askQuestion​(java.lang.String realm,
                                     java.lang.String question,
                                     boolean showAnswer,
                                     boolean maySave)
        Ask the user a question, and (usually) store the auth credential caching preference specified by maySave (used by userAllowedSave()). Applications wanting to emulate the behavior of --non-interactive will implement this method in a manner which does not require user interaction (e.g. a no-op).
        Parameters:
        realm - The realm from which the question originates.
        question - The text of the question.
        showAnswer - Whether the answer may be displayed.
        maySave - Whether caching of credentials is allowed. Usually affects the return value of the userAllowedSave() method.
        Returns:
        answer as entered or null if canceled
      • userAllowedSave

        boolean userAllowedSave()
        Returns:
        Whether the caller allowed caching of credentials the last time prompt(String, String, boolean) was called. Applications wanting to emulate the behavior of --no-auth-cache will probably always return false.