File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Digest Authentication for a Jersey Client

 
Juergen Meier
Greenhorn
Posts: 2
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to make a Java-client to access a restful webservice, running on a tomcat. I always get a 401 error, and I have to authenticate with digest authentication.
How can I do that?

Are there any libraries or Frameworks that can do that?

Do you have any recomendations or source code examples for that task?

Thanks a lot,
Dohar
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kind of client are you using? If it's the Jersey client, something like "cli.addFilter(new HTTPDigestAuthFilter(username, password));" should work.

Apache HttpClient or HttpComponents also support DIGEST.
 
Juergen Meier
Greenhorn
Posts: 2
Eclipse IDE MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It works!
Thank you very much
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic