public class StandardAuthenticationProvider extends AbstractAuthenticationProvider
Modifier and Type | Field and Description |
---|---|
protected static String |
WSSE_NAMESPACE |
protected static String |
WSU_NAMESPACE |
Constructor and Description |
---|
StandardAuthenticationProvider() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSessionParameterHeadersToFixedHeaders()
Adds the
SessionParameter.HEADER to the fixed headers. |
protected List<String> |
createBasicAuthHeaderValue(String username,
String password)
Creates a basic authentication header value from a username and a
password.
|
protected Map<String,List<String>> |
getFixedHeaders()
Returns the HTTP headers that are sent with all requests.
|
protected boolean |
getHandleCookies()
Returns if the authentication provider should handle cookies.
|
Map<String,List<String>> |
getHTTPHeaders(String url)
Returns a set of HTTP headers (key-value pairs) that should be added to a
HTTP call.
|
protected boolean |
getSendBasicAuth()
Returns if a HTTP Basic Authentication header should be sent.
|
protected boolean |
getSendBearerToken()
Returns if an OAuth Bearer token header should be sent.
|
protected boolean |
getSendUsernameToken()
Returns if a UsernameToken should be sent.
|
Element |
getSOAPHeaders(Object portObject)
Returns a SOAP header that should be added to a Web Services call.
|
protected boolean |
isTrue(String parameterName)
Returns
true if the given parameter exists in the session
and is set to true, false otherwise. |
void |
putResponseHeaders(String url,
int statusCode,
Map<String,List<String>> headers)
Receives the HTTP headers after a call.
|
void |
setSession(BindingSession session)
Sets the
BindingSession the authentication provider lives in. |
getBearerToken, getHandlerResolver, getHostnameVerifier, getPassword, getProxyPassword, getProxyUser, getSession, getSSLSocketFactory, getUser
protected static final String WSSE_NAMESPACE
protected static final String WSU_NAMESPACE
public void setSession(BindingSession session)
AbstractAuthenticationProvider
BindingSession
the authentication provider lives in.setSession
in interface SessionAwareAuthenticationProvider
setSession
in class AbstractAuthenticationProvider
public Map<String,List<String>> getHTTPHeaders(String url)
AuthenticationProvider
getHTTPHeaders
in interface AuthenticationProvider
getHTTPHeaders
in class AbstractAuthenticationProvider
url
- the URL of the HTTP callnull
if no additional headers
should be setpublic void putResponseHeaders(String url, int statusCode, Map<String,List<String>> headers)
AuthenticationProvider
putResponseHeaders
in interface AuthenticationProvider
putResponseHeaders
in class AbstractAuthenticationProvider
url
- the URLstatusCode
- the status codeheaders
- the HTTP headerspublic Element getSOAPHeaders(Object portObject)
AuthenticationProvider
getSOAPHeaders
in interface AuthenticationProvider
getSOAPHeaders
in class AbstractAuthenticationProvider
portObject
- the port objectnull
if no additional headers
should be setprotected Map<String,List<String>> getFixedHeaders()
protected void addSessionParameterHeadersToFixedHeaders()
SessionParameter.HEADER
to the fixed headers. This
method should only be called from the setSession(BindingSession)
method to avoid threading issues.protected List<String> createBasicAuthHeaderValue(String username, String password)
protected boolean getSendBasicAuth()
protected boolean getSendBearerToken()
protected boolean getSendUsernameToken()
protected boolean getHandleCookies()
protected boolean isTrue(String parameterName)
true
if the given parameter exists in the session
and is set to true, false
otherwise.Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.