public class BasicAuthClient extends HttpClient
Modifier and Type | Field and Description |
---|---|
protected org.apache.http.auth.Credentials |
credentials |
protected static String |
SECURITY_ENDPOINT_DOES_NOT_EXIST |
protected static String |
SECURITY_TOKEN_KEY |
protected static String |
SECURITY_TOKEN_PARAM_KEY |
protected String |
securityToken |
client, server, wsapiVersion
Constructor and Description |
---|
BasicAuthClient(URI server,
String userName,
String password)
Construct a new client.
|
Modifier and Type | Method and Description |
---|---|
protected void |
attachSecurityInfo(org.apache.http.client.methods.HttpRequestBase request)
Attach the security token parameter to the request.
|
protected String |
doRequest(org.apache.http.client.methods.HttpRequestBase request)
Execute a request against the WSAPI
|
close, doDelete, doGet, doPost, doPut, executeRequest, getServer, getWsapiUrl, getWsapiVersion, setApplicationName, setApplicationVendor, setApplicationVersion, setClientCredentials, setProxy, setProxy, setWsapiVersion
createHttpParams, createHttpProcessor, setDefaultHttpParams
addRequestInterceptor, addRequestInterceptor, addResponseInterceptor, addResponseInterceptor, clearRequestInterceptors, clearResponseInterceptors, createAuthSchemeRegistry, createClientConnectionManager, createClientRequestDirector, createClientRequestDirector, createClientRequestDirector, createConnectionKeepAliveStrategy, createConnectionReuseStrategy, createCookieSpecRegistry, createCookieStore, createCredentialsProvider, createHttpContext, createHttpRequestRetryHandler, createHttpRoutePlanner, createProxyAuthenticationHandler, createProxyAuthenticationStrategy, createRedirectHandler, createRequestExecutor, createTargetAuthenticationHandler, createTargetAuthenticationStrategy, createUserTokenHandler, determineParams, execute, execute, execute, execute, execute, execute, execute, execute, getAuthSchemes, getBackoffManager, getConnectionBackoffStrategy, getConnectionKeepAliveStrategy, getConnectionManager, getConnectionReuseStrategy, getCookieSpecs, getCookieStore, getCredentialsProvider, getHttpProcessor, getHttpRequestRetryHandler, getParams, getProxyAuthenticationHandler, getProxyAuthenticationStrategy, getRedirectHandler, getRedirectStrategy, getRequestExecutor, getRequestInterceptor, getRequestInterceptorCount, getResponseInterceptor, getResponseInterceptorCount, getRoutePlanner, getTargetAuthenticationHandler, getTargetAuthenticationStrategy, getUserTokenHandler, removeRequestInterceptorByClass, removeResponseInterceptorByClass, setAuthSchemes, setBackoffManager, setConnectionBackoffStrategy, setCookieSpecs, setCookieStore, setCredentialsProvider, setHttpRequestRetryHandler, setKeepAliveStrategy, setParams, setProxyAuthenticationHandler, setProxyAuthenticationStrategy, setRedirectHandler, setRedirectStrategy, setReuseStrategy, setRoutePlanner, setTargetAuthenticationHandler, setTargetAuthenticationStrategy, setUserTokenHandler
protected static final String SECURITY_ENDPOINT_DOES_NOT_EXIST
protected static final String SECURITY_TOKEN_PARAM_KEY
protected static final String SECURITY_TOKEN_KEY
protected String securityToken
protected org.apache.http.auth.Credentials credentials
protected String doRequest(org.apache.http.client.methods.HttpRequestBase request) throws IOException
doRequest
in class HttpClient
request
- the request to be executedIOException
- if a non-200 response code is returned or if some other
problem occurs while executing the requestprotected void attachSecurityInfo(org.apache.http.client.methods.HttpRequestBase request) throws IOException, URISyntaxException
request
- the request to be modifiedIOException
- if a non-200 response code is returned or if some other
problem occurs while executing the requestURISyntaxException
- if there is a problem with the url in the requestCopyright © 2016. All Rights Reserved.