## HTTPClient
Interface AuthorizationPrompter

All Known Implementing Classes:
  SimpleAuthPopup, SimpleAuthPrompt

public interface AuthorizationPrompter

This is the interface that a username/password prompter must implement. The `DefaultAuthHandler` invokes an instance of this each time it needs a username and password to satisfy an authorization challenge (for which it doesn't already have the necessary info). This can be used to implement a different UI from the default popup box for soliciting usernames and passwords, or for using an altogether different way of getting the necessary auth info.

Since:
  V0.3-3
See Also:
  `DefaultAuthHandler.setAuthorizationPrompter(HTTPClient.AuthorizationPrompter)`

Method Summary
`NVPair` `getUsernamePassword(AuthorizationInfo challenge, boolean forProxy)` This method is invoked whenever a username and password is required for an authentication challenge to proceed.

Method Detail

### getUsernamePassword

    public NVPair getUsernamePassword(AuthorizationInfo challenge,
                                      boolean forProxy)

  This method is invoked whenever a username and password is required for an authentication challenge to proceed.

  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:
    an NVPair containing the username and password in the name and value fields, respectively, or null if the authorization challenge handling is to be aborted (e.g. when the user hits the Cancel button).