org.apache.chemistry.opencmis.client.bindings.spi
Class AbstractAuthenticationProvider

java.lang.Object
  extended by org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider
All Implemented Interfaces:
java.io.Serializable, SessionAwareAuthenticationProvider, AuthenticationProvider
Direct Known Subclasses:
NTLMAuthenticationProvider, StandardAuthenticationProvider

public abstract class AbstractAuthenticationProvider
extends java.lang.Object
implements SessionAwareAuthenticationProvider

Authentication provider class.

See Also:
Serialized Form

Constructor Summary
AbstractAuthenticationProvider()
           
 
Method Summary
 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.
protected  java.lang.String getPassword()
          Gets the password from the session.
protected  java.lang.String getProxyPassword()
          Gets the proxy password from the session.
protected  java.lang.String getProxyUser()
          Gets the proxy user name from the session.
 BindingSession getSession()
          Returns BindingSession.
 org.w3c.dom.Element getSOAPHeaders(java.lang.Object portObject)
          Returns a SOAP header that should be added to a Web Services call.
protected  java.lang.String getUser()
          Gets the user name from the session.
 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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAuthenticationProvider

public AbstractAuthenticationProvider()
Method Detail

setSession

public void setSession(BindingSession session)
Sets the BindingSession the authentication provider lives in.

Specified by:
setSession in interface SessionAwareAuthenticationProvider

getSession

public BindingSession getSession()
Returns BindingSession.


getHTTPHeaders

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHTTPHeaders(java.lang.String url)
Description copied from interface: AuthenticationProvider
Returns a set of HTTP headers (key-value pairs) that should be added to a HTTP call. This will be called by the AtomPub and the Web Services binding. You might want to check the binding in use before you set the headers.

Specified by:
getHTTPHeaders in interface AuthenticationProvider
Parameters:
url - the URL of the HTTP call
Returns:
the HTTP headers or null if no additional headers should be set

getSOAPHeaders

public org.w3c.dom.Element getSOAPHeaders(java.lang.Object portObject)
Description copied from interface: AuthenticationProvider
Returns a SOAP header that should be added to a Web Services call.

Specified by:
getSOAPHeaders in interface AuthenticationProvider
Parameters:
portObject - the port object
Returns:
the SOAP headers or null if no additional headers should be set

putResponseHeaders

public void putResponseHeaders(java.lang.String url,
                               int statusCode,
                               java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Description copied from interface: AuthenticationProvider
Receives the HTTP headers after a call.

Specified by:
putResponseHeaders in interface AuthenticationProvider
Parameters:
url - the URL
statusCode - the status code
headers - the HTTP headers

getUser

protected java.lang.String getUser()
Gets the user name from the session.

Returns:
the user name or null if the user name is not set

getPassword

protected java.lang.String getPassword()
Gets the password from the session.

Returns:
the password or null if the password is not set

getProxyUser

protected java.lang.String getProxyUser()
Gets the proxy user name from the session.

Returns:
the proxy user name or null if the user name is not set

getProxyPassword

protected java.lang.String getProxyPassword()
Gets the proxy password from the session.

Returns:
the proxy password or null if the password is not set


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.