bad.robot.http.apache
Class ApacheAuthenticationSchemeHttpContextBuilder

java.lang.Object
  extended by bad.robot.http.apache.ApacheAuthenticationSchemeHttpContextBuilder
All Implemented Interfaces:
Builder<org.apache.http.protocol.HttpContext>, ConfigurableHttpClient

public class ApacheAuthenticationSchemeHttpContextBuilder
extends Object
implements Builder<org.apache.http.protocol.HttpContext>, ConfigurableHttpClient

Build a "local context" to use with individual HTTP verbs. The HttpContext is used to share information, in this case, which authentication scheme the client should be using (based on the target URL).


Method Summary
static ApacheAuthenticationSchemeHttpContextBuilder anApacheBasicAuthScheme()
           
 org.apache.http.protocol.HttpContext build()
           
 ApacheAuthenticationSchemeHttpContextBuilder withBasicAuthCredentials(String username, String password, URL url)
           
 ApacheAuthenticationSchemeHttpContextBuilder withOAuthCredentials(String authorisationToken, URL url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

anApacheBasicAuthScheme

public static ApacheAuthenticationSchemeHttpContextBuilder anApacheBasicAuthScheme()

withBasicAuthCredentials

public ApacheAuthenticationSchemeHttpContextBuilder withBasicAuthCredentials(String username,
                                                                             String password,
                                                                             URL url)
Specified by:
withBasicAuthCredentials in interface ConfigurableHttpClient

withOAuthCredentials

public ApacheAuthenticationSchemeHttpContextBuilder withOAuthCredentials(String authorisationToken,
                                                                         URL url)
Specified by:
withOAuthCredentials in interface ConfigurableHttpClient

build

public org.apache.http.protocol.HttpContext build()
Specified by:
build in interface Builder<org.apache.http.protocol.HttpContext>


Copyright © 2012. All Rights Reserved.