users@jersey.java.net

[Jersey] Prompting for authentication

From: Scott Palmer <swpalmer_at_gmail.com>
Date: Wed, 13 May 2015 13:54:38 -0400

I'm looking for examples of how I can prompt the user of my client
application to enter credentials only when they are required by the
server. I'm using Jersey 2.16.

I've looked at the documentation: "5.9.1. Http Authentication Support"
https://jersey.java.net/nonav/documentation/latest/client.html#d0e5181

But it is all about setting up the credentials ahead of time. That's not
what I want. The user will be ale to enter a URL, some will need
credentials and some won't, but until the request is made we don't know. I
want to prompt for the credentials on demand.

Regards,

Scott