This content has been marked as final. Show 2 replies
When providing the username and credentials for HTTP basic auth - give user name as "admin;user" instead of just user. For password, then use the admin's password.
Hi cjoy, thanks for your response.
And obviously it works also via API, for example using apache http commons client.
I post a simple snippet, may be it can be useful for someone.
HostConfiguration hostConfig = new HostConfiguration();
hostConfig.setHost("http://...");//it depends on caldav server
// define connection manager
HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
HttpConnectionManagerParams params = new HttpConnectionManagerParams();
int maxHostConnections = 20;
// define the HttpClient with user and password
client = new HttpClient(connectionManager);
Credentials creds = new UsernamePasswordCredentials("admin"+";"+"a_username", "adminpassword");
//then you can use a caldav library to fetch calendar information about the user
//i'm successfully using ical4j together with org.apache.jackrabbit.webdav