2 Replies Latest reply on Apr 11, 2012 9:49 AM by 929372

    Caldav Proxy auth via API

      in this document http://www.oracle.com/us/industries/communications/oracle-calendar-server-wp-1449649.pdf
      i've read that it's possible in Oracle calendar server to use the so called "proxy auth". As stated "proxy authentication" enables a calendar administrator
      to log onto the Oracle Communications Calendar Server on behalf of a calendar user, which is useful for integrating additional servers or services with the Calendar Server.

      Can someone provide some code samples on this kind of authentication, using API such as ical4j, or other java client lib?
      It's possible to make a proxy login using an URI, and organizing parameters direclty in the query string?.
      I' ve seen something similar with WCAP protocol (login.wcap), but i need to use CALDAV.

      Thanks in advance.
        • 1. Re: Caldav Proxy auth via API
          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.
          • 2. Re: Caldav Proxy auth via API
            Hi cjoy, thanks for your response.
            It works.

            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;
            params.setMaxConnectionsPerHost(hostConfig, maxHostConnections);

            // define the HttpClient with user and password
            client = new HttpClient(connectionManager);
            Credentials creds = new UsernamePasswordCredentials("admin"+";"+"a_username", "adminpassword");
            client.getState().setCredentials(AuthScope.ANY, creds);
            //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