org.tigris.subversion.javahl
Interface PromptUserPassword3

All Superinterfaces:
PromptUserPassword, PromptUserPassword2

public interface PromptUserPassword3
extends PromptUserPassword2

The interface for requesting authentication credentials from the user. Should the javahl bindings need the matching information, these methodes will be called.

This callback can also be used to provide the equivalent of the --no-auth-cache and --non-interactive arguments accepted by the command-line client.


Field Summary
 
Fields inherited from interface org.tigris.subversion.javahl.PromptUserPassword2
AccecptTemporary, AcceptPermanently, AcceptTemporary, Reject
 
Method Summary
 String askQuestion(String realm, 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()).
 boolean prompt(String realm, 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()).
 boolean userAllowedSave()
           
 
Methods inherited from interface org.tigris.subversion.javahl.PromptUserPassword2
askTrustSSLServer
 
Methods inherited from interface org.tigris.subversion.javahl.PromptUserPassword
askQuestion, askYesNo, getPassword, getUsername, prompt
 

Method Detail

prompt

boolean prompt(String realm,
               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

String askQuestion(String realm,
                   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.