HTTPClient
Class SimpleAuthPrompt
java.lang.Object
HTTPClient.SimpleAuthPrompt
- All Implemented Interfaces:
- AuthorizationPrompter
- class SimpleAuthPrompt
- extends Object
- implements AuthorizationPrompter
This class implements a simple command line prompter that request
username and password used for the "basic" and "digest" authentication
schemes.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleAuthPrompt
SimpleAuthPrompt()
getUsernamePassword
public NVPair getUsernamePassword(AuthorizationInfo challenge,
boolean forProxy)
- the method called by DefaultAuthHandler.
- Specified by:
getUsernamePassword in interface AuthorizationPrompter
- Parameters:
challenge - the parsed challenge from the server; the host,
port, scheme, realm and params are set to the
values given by the server in the challenge.forProxy - true if the info is for a proxy (i.e. this is part of
handling a 407 response); false otherwise (i.e. the
response code was 401).
- Returns:
- the username/password pair
canUseCLPrompt
static boolean canUseCLPrompt()
- Returns:
- true for Unix's and VMS