6.5.1. Login to repository

Note

The CMIS service uses the default authentication in general case, but it can be overridden in case of embedding CMIS into an Application Service. In these examples, only the Basic HTTP authentication is covered.

Using Java

 import org.apache.commons.httpclient.HttpClient;

 import org.apache.commons.httpclient.UsernamePasswordCredentials;
 import org.apache.commons.httpclient.auth.AuthScope;
 import org.apache.commons.httpclient.methods.GetMethod;
 HttpClient client = new HttpClient();
 client.getState().setCredentials(
 new AuthScope("localhost", 8080, "realm"),
 new UsernamePasswordCredentials("root", "gtn");
 ....
Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus