org.exoplatform.common.http.client
Interface AuthorizationPrompter
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
- Version:
- 0.3-3 06/05/2001
- Author:
- Ronald Tschal�r
- See Also:
DefaultAuthHandler#setAuthorizationPrompter(HTTPClient.AuthorizationPrompter)
getUsernamePassword
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).
Copyright © 2010 eXo Platform SAS. All Rights Reserved.