Digest Authentication Problem

We have a server which supports only digest authentication. We have to build a core java application(may be a JAR) which can first authenticates user from the server and then go a head with consuming services. I am not been able to find a best way of doing this. Any pointer(some specific API or design) which can lead to a good practice implementation would be highly appreciated.