You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2011/05/08 00:33:50 UTC
svn commit: r1100645 -
/chemistry/site/trunk/content/java/how-to/how-to-connect.mdtext
Author: fmui
Date: Sat May 7 22:33:50 2011
New Revision: 1100645
URL: http://svn.apache.org/viewvc?rev=1100645&view=rev
Log:
CMS commit to chemistry by fmui
Modified:
chemistry/site/trunk/content/java/how-to/how-to-connect.mdtext
Modified: chemistry/site/trunk/content/java/how-to/how-to-connect.mdtext
URL: http://svn.apache.org/viewvc/chemistry/site/trunk/content/java/how-to/how-to-connect.mdtext?rev=1100645&r1=1100644&r2=1100645&view=diff
==============================================================================
--- chemistry/site/trunk/content/java/how-to/how-to-connect.mdtext (original)
+++ chemistry/site/trunk/content/java/how-to/how-to-connect.mdtext Sat May 7 22:33:50 2011
@@ -9,11 +9,16 @@ A few repositories need [special treatme
## Using Cookies
-Some repositories are sending HTTP cookies to maintain state (although CMIS is stateless) or accelerate authentication for subsequent calls. OpenCMIS
-ignores these cookies by default. The following code snippet activates cookies for your application and OpenCMIS.
-See [this page](http://java.sun.com/docs/books/tutorial/networking/cookies/cookiemanager.html) for details.
+Some repositories are sending HTTP cookies to maintain state (although CMIS is stateless) or to accelerate authentication for subsequent calls. OpenCMIS
+ignores these cookies by default.
+
+The following code snippet activates cookies for your application and OpenCMIS.
+See [this page](http://java.sun.com/docs/books/tutorial/networking/cookies/cookiemanager.html) for details. Note, that all OpenCMIS sessions share the same set of cookies.
:::java
CookieManager cm = new CookieManager(null, CookiePolicy.ACCEPT_ALL);
CookieHandler.setDefault(cm);
+If each session has to manage a separate set of cookies, a [custom authentication provider](../developing/client/dev-client-bindings.html#OpenCMISClientBindings-CustomAuthenticationProvider) is required.
+A sample authentication provider can be found [here](https://svn.apache.org/repos/asf/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/CookieAwareStandardAuthenticationProvider.java-6).
+(This authentication provider is not part of the OpenCMIS client library because it makes use of Java 6 classes and OpenCMIS is complied with Java 5. It also requires OpenCMIS 0.4.0 or higher.)
\ No newline at end of file