public interface AuthorizationPrompter
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.DefaultAuthHandler.setAuthorizationPrompter(HTTPClient.AuthorizationPrompter)
Modifier and Type | Method and Description |
---|---|
NVPair |
getUsernamePassword(AuthorizationInfo challenge,
boolean forProxy)
This method is invoked whenever a username and password is required
for an authentication challenge to proceed.
|
NVPair getUsernamePassword(AuthorizationInfo challenge, boolean forProxy)
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).