|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider
org.apache.chemistry.opencmis.client.bindings.spi.StandardAuthenticationProvider
public class StandardAuthenticationProvider
Standard authentication provider class. Adds a basic authentication HTTP header and a WS-Security UsernameToken SOAP header.
Constructor Summary | |
---|---|
StandardAuthenticationProvider()
|
Method Summary | |
---|---|
protected java.util.List<java.lang.String> |
createBasicAuthHeaderValue(java.lang.String username,
java.lang.String password)
Creates a basic authentication header value from a username and a password. |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHTTPHeaders(java.lang.String url)
Returns a set of HTTP headers (key-value pairs) that should be added to a HTTP call. |
org.w3c.dom.Element |
getSOAPHeaders(java.lang.Object portObject)
Returns a SOAP header that should be added to a Web Services call. |
protected boolean |
isTrue(java.lang.String parameterName)
Returns true if the given parameter exists in the session
and is set to true, false otherwise. |
void |
putResponseHeaders(java.lang.String url,
int statusCode,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Receives the HTTP headers after a call. |
void |
setSession(BindingSession session)
Sets the BindingSession the authentication provider lives in. |
Methods inherited from class org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider |
---|
getPassword, getProxyPassword, getProxyUser, getSession, getUser |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardAuthenticationProvider()
Method Detail |
---|
public void setSession(BindingSession session)
AbstractAuthenticationProvider
BindingSession
the authentication provider lives in.
setSession
in interface SessionAwareAuthenticationProvider
setSession
in class AbstractAuthenticationProvider
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHTTPHeaders(java.lang.String url)
AuthenticationProvider
getHTTPHeaders
in interface AuthenticationProvider
getHTTPHeaders
in class AbstractAuthenticationProvider
url
- the URL of the HTTP call
null
if no additional headers
should be setpublic void putResponseHeaders(java.lang.String url, int statusCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
AuthenticationProvider
putResponseHeaders
in interface AuthenticationProvider
putResponseHeaders
in class AbstractAuthenticationProvider
url
- the URLstatusCode
- the status codeheaders
- the HTTP headerspublic org.w3c.dom.Element getSOAPHeaders(java.lang.Object portObject)
AuthenticationProvider
getSOAPHeaders
in interface AuthenticationProvider
getSOAPHeaders
in class AbstractAuthenticationProvider
portObject
- the port object
null
if no additional headers
should be setprotected java.util.List<java.lang.String> createBasicAuthHeaderValue(java.lang.String username, java.lang.String password)
protected boolean isTrue(java.lang.String parameterName)
true
if the given parameter exists in the session
and is set to true, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |