Reputation: 2299
I have created basic authentication for a spring boot application which requires username and password.
Using it from browser works fine, with a popup asking for password
But how do I use it in a java application?(preferably using jackson 2 but other tools are fine). Searching online only shows about web based login pages.
Upvotes: 1
Views: 1797
Reputation: 161
You need to set-up Authorization header to contain username and password in a proper Base64 encoded format to the http request you're making from the java application. Read section client side from this page for details
Upvotes: 1