Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-webdav-dev] authentication error : more info

 I'm using for my webdav client Authenticator implementation from
'org.eclipse.team.examples.core.webdav'.
 First, I tried to connect to a webdav server, which use Basic
authentication scheme. Client works fine. Second, I tried to connect to a
webdav server, which use Digest authentication scheme. I received a
WebDAVException(401: Unauthorized) from server.

From my client code:

            ..

            String url = "http://localhost/dav";;

            WebDAVFactory davFactory = new WebDAVFactory();

            ILocator locator = davFactory.newStableLocator(url);



HttpClient clientHTTP = new HttpClient();

            Authenticator auth= new Authenticator("horatiu","horatiu");

            clientHTTP.setAuthenticator(auth);



            RemoteDAVClient client = new RemoteDAVClient( davFactory,
clientHTTP);

            ResourceHandle res = new ResourceHandle( client, locator);

            res.lock();

            ..



Regards,

Horatiu




Back to the top