org.apache.http.impl.client
Class DefaultTargetAuthenticationHandler

java.lang.Object
  extended by org.apache.http.impl.client.AbstractAuthenticationHandler
      extended by org.apache.http.impl.client.DefaultTargetAuthenticationHandler
All Implemented Interfaces:
AuthenticationHandler

@Immutable
public class DefaultTargetAuthenticationHandler
extends AbstractAuthenticationHandler

Default AuthenticationHandler implementation for target host authentication.

Since:
4.0

Constructor Summary
DefaultTargetAuthenticationHandler()
           
 
Method Summary
 Map<String,Header> getChallenges(HttpResponse response, HttpContext context)
          Extracts from the given HTTP response a collection of authentication challenges, each of which represents an authentication scheme supported by the authentication host.
 boolean isAuthenticationRequested(HttpResponse response, HttpContext context)
          Determines if the given HTTP response response represents an authentication challenge that was sent back as a result of authentication failure
 
Methods inherited from class org.apache.http.impl.client.AbstractAuthenticationHandler
getAuthPreferences, parseChallenges, selectScheme
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTargetAuthenticationHandler

public DefaultTargetAuthenticationHandler()
Method Detail

isAuthenticationRequested

public boolean isAuthenticationRequested(HttpResponse response,
                                         HttpContext context)
Description copied from interface: AuthenticationHandler
Determines if the given HTTP response response represents an authentication challenge that was sent back as a result of authentication failure

Parameters:
response - HTTP response.
context - HTTP context.
Returns:
true if user authentication is required, false otherwise.

getChallenges

public Map<String,Header> getChallenges(HttpResponse response,
                                        HttpContext context)
                                 throws MalformedChallengeException
Description copied from interface: AuthenticationHandler
Extracts from the given HTTP response a collection of authentication challenges, each of which represents an authentication scheme supported by the authentication host.

Parameters:
response - HTTP response.
context - HTTP context.
Returns:
a collection of challenges keyed by names of corresponding authentication schemes.
Throws:
MalformedChallengeException - if one of the authentication challenges is not valid or malformed.


Copyright © 1999-2010 Apache Software Foundation. All Rights Reserved.