org.apache.http.impl.client
Class AbstractAuthenticationHandler
java.lang.Object
org.apache.http.impl.client.AbstractAuthenticationHandler
- All Implemented Interfaces:
- AuthenticationHandler
- Direct Known Subclasses:
- DefaultProxyAuthenticationHandler, DefaultTargetAuthenticationHandler
@Immutable
public abstract class AbstractAuthenticationHandler
- extends java.lang.Object
- implements AuthenticationHandler
Base class for AuthenticationHandler
implementations.
- Since:
- 4.0
Method Summary |
protected java.util.List<java.lang.String> |
getAuthPreferences()
|
protected java.util.Map<java.lang.String,org.apache.http.Header> |
parseChallenges(org.apache.http.Header[] headers)
|
AuthScheme |
selectScheme(java.util.Map<java.lang.String,org.apache.http.Header> challenges,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
Selects one authentication challenge out of all available and
creates and generates AuthScheme instance capable of
processing that challenge. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractAuthenticationHandler
public AbstractAuthenticationHandler()
parseChallenges
protected java.util.Map<java.lang.String,org.apache.http.Header> parseChallenges(org.apache.http.Header[] headers)
throws MalformedChallengeException
- Throws:
MalformedChallengeException
getAuthPreferences
protected java.util.List<java.lang.String> getAuthPreferences()
selectScheme
public AuthScheme selectScheme(java.util.Map<java.lang.String,org.apache.http.Header> challenges,
org.apache.http.HttpResponse response,
org.apache.http.protocol.HttpContext context)
throws AuthenticationException
- Description copied from interface:
AuthenticationHandler
- Selects one authentication challenge out of all available and
creates and generates
AuthScheme
instance capable of
processing that challenge.
- Specified by:
selectScheme
in interface AuthenticationHandler
- Parameters:
challenges
- collection of challenges.response
- HTTP response.context
- HTTP context.
- Returns:
- authentication scheme to use for authentication.
- Throws:
AuthenticationException
- if an authentication scheme
could not be selected.
Copyright © 1999-2011 Apache Software Foundation. All Rights Reserved.