|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.httpclient.Authenticator
HttpAuthenticator
Utility methods for HTTP authorization and authentication. This class provides utility methods for generating responses to HTTP www and proxy authentication challenges.
A client SHOULD assume that all paths at or deeper than the depth of the last symbolic element in the path field of the Request-URI also are within the protection space specified by the BasicScheme realm value of the current challenge. A client MAY preemptively send the corresponding Authorization header with requests for resources in that space without receipt of another challenge from the server. Similarly, when a client sends a request to a proxy, it may reuse a userid and password in the Proxy-Authorization header field without receiving another challenge from the proxy server.
Field Summary | |
static String |
PROXY_AUTH
Deprecated. The proxy authenticate challange header. |
static String |
PROXY_AUTH_RESP
Deprecated. The proxy authenticate response header. |
static String |
WWW_AUTH
Deprecated. The www authenticate challange header. |
static String |
WWW_AUTH_RESP
Deprecated. The www authenticate response header. |
Constructor Summary | |
Authenticator()
Deprecated. |
Method Summary | |
static boolean |
authenticate(HttpMethod method,
HttpState state)
Deprecated. use HttpAuthenticator.authenticate(AuthScheme, HttpMethod, HttpConnection, HttpState) |
static boolean |
authenticateProxy(HttpMethod method,
HttpState state)
Deprecated. use HttpAuthenticator.authenticateProxy(AuthScheme, HttpMethod, HttpConnection, HttpState) |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final String WWW_AUTH
public static final String WWW_AUTH_RESP
public static final String PROXY_AUTH
public static final String PROXY_AUTH_RESP
Constructor Detail |
public Authenticator()
Method Detail |
public static boolean authenticate(HttpMethod method, HttpState state) throws HttpException, UnsupportedOperationException
HttpAuthenticator.authenticate(AuthScheme, HttpMethod, HttpConnection, HttpState)
method
- the HttpMethod which requires authenticationstate
- the HttpState object providing CredentialsHttpException
- when a parsing or other error occursUnsupportedOperationException
- when the challenge type is not
supportedHttpState.setCredentials(String,Credentials)
public static boolean authenticateProxy(HttpMethod method, HttpState state) throws HttpException, UnsupportedOperationException
HttpAuthenticator.authenticateProxy(AuthScheme, HttpMethod, HttpConnection, HttpState)
method
- the HttpMethod which requires authenticationstate
- the HttpState object providing CredentialsHttpException
- when a parsing or other error occursUnsupportedOperationException
- when the given challenge type is
not supportedHttpState.setProxyCredentials(String,Credentials)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |