chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: Authentication
Date Tue, 19 Jun 2012 14:05:19 GMT
 Hi Ian,

 The CallContextHandlers only work for the AtomPub Binding and the 
 Browser Binding.
 For the Web Services Binding, you have implement a SOAP Handler. (The 
 Web Service authentication is usually different anyway.) So, you already 
 doing it as intended!

 Be careful that you don't break the content streaming when you deal 
 with SOAP headers.
 You may want use the class 
 org.apache.chemistry.opencmis.server.impl.webservices.AuthHandler as a 
 starting point. Note that this class extends the MessageHandler 
 interface and not the SOAPHandler interface.


 - Florian



> Dear all,
>
> We need to implement our own authentication for our repository. The
> how to section on the web site
> (http://chemistry.apache.org/java/how-to/how-to-create-server.html)
> says to create a subclass of BasicAuthCallContextHandler. We can get
> this to work for the AtomPub binding by including the following in 
> the
> web.xml file.
>
> 	<servlet>
> 		<servlet-name>cmisatom</servlet-name>
> 
> 		<servlet-class>org.apache.chemistry.opencmis.server.impl.atompub.CmisAtomPubServlet</servlet-class>
> 		<init-param>
> 			<param-name>callContextHandler</param-name>
> 
> 			<param-value>com.picdar.webservices.CMIS.cmis.helper.BasicAuthenticationCallContextHandler</param-value>
> 		</init-param>
> 		<load-on-startup>3</load-on-startup>
> 	</servlet>
>
> Is there a way to register the callContextHandler for use with the
> WebServices binding? At present we register a handler-chain for each
> endPoint in the sun-jaxws.xml file as follows
>
> 	<endpoint name="RepositoryService" 
> wsdl="WEB-INF/wsdl/CMISWS-Service.wsdl"
> 
> 		implementation="org.apache.chemistry.opencmis.server.impl.webservices.RepositoryService"
> 
> 		service="{http://docs.oasis-open.org/ns/cmis/ws/200908/}RepositoryService"
> 
> 		port="{http://docs.oasis-open.org/ns/cmis/ws/200908/}RepositoryServicePort"
> 		url-pattern="/services/RepositoryService" enable-mtom="true">
> 		<handler-chains xmlns="http://java.sun.com/xml/ns/javaee">
> 			<handler-chain>
> 				<handler>
> 
> 					<handler-class>com.picdar.webservices.CMIS.cmis.helper.SOAPAuthenticationHandler</handler-class>
> 				</handler>
> 			</handler-chain>
> 		</handler-chains>
> 	</endpoint>
>
> Regards,
> Ian


Mime
View raw message