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

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

public class NTLMAuthenticationProvider
extends AbstractAuthenticationProvider

NTLM authentication provider class. USE WITH CARE! This authentication provider sets a Authenticator which will replace the current authenticator, if any. It will fail if this authenticator will be replaced by another part of the code. Since Authenticator is a system-wide authenticator, it will not reliably work in multi-user environments! To achieve that you have to wrap OpenCMIS into its own class loader.

See Also:
Serialized Form

Constructor Summary
NTLMAuthenticationProvider()
           
 
Method Summary
 Map<String,List<String>> getHTTPHeaders(String url)
          Returns a set of HTTP headers (key-value pairs) that should be added to a HTTP call.
 Element getSOAPHeaders(Object portObject)
          Returns a SOAP header that should be added to a Web Services call.
 
Methods inherited from class org.apache.chemistry.opencmis.client.bindings.spi.AbstractAuthenticationProvider
getPassword, getProxyPassword, getProxyUser, getSession, getUser, putResponseHeaders, setSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NTLMAuthenticationProvider

public NTLMAuthenticationProvider()
Method Detail

getHTTPHeaders

public Map<String,List<String>> getHTTPHeaders(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
Overrides:
getHTTPHeaders in class AbstractAuthenticationProvider
Parameters:
url - the URL of the HTTP call
Returns:
the HTTP headers or null if no additional headers should be set

getSOAPHeaders

public Element getSOAPHeaders(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
Overrides:
getSOAPHeaders in class AbstractAuthenticationProvider
Parameters:
portObject - the port object
Returns:
the SOAP headers or null if no additional headers should be set


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