Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions

Copyright:
==================================================================== Copyright (c) 2003-2005 CollabNet. All rights reserved. This software is licensed as described in the file COPYING, which you should have received as part of this distribution. The terms are also available at http://subversion.tigris.org/license-1.html. If newer versions of this license are posted there, you may use a newer version instead, at your option. This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history and logs, available at http://subversion.tigris.org/. ====================================================================
Endcopyright:
package org.tigris.subversion.javahl;

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.

public interface PromptUserPassword3 extends PromptUserPassword2
{
    
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).
    public boolean prompt(String realmString usernameboolean 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
    public String askQuestion(String realmString question,
                              boolean showAnswerboolean maySave);

    

Returns:
Whether the caller allowed caching of credentials the last time prompt(java.lang.String,java.lang.String,boolean) was called. Applications wanting to emulate the behavior of --no-auth-cache will probably always return false.
    public boolean userAllowedSave();
New to GrepCode? Check out our FAQ X