JSF - Supply basic http authentication

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


JSF - Supply basic http authentication



I have a scenario where I have button which need to open up a new tab and go to an external site. This site require sbasic HTTP authentication. So I need to supply the credntials but am unsure how.



Usually I would do something like this inside of my method (which a command button would invoke) to redirect to a new page:


ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
externalContext.redirect("http://stackoverflow.com");



Which of course works, but I can't find if using ExternalContext I can then send Basic Authentication credentials in the header?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to scale/resize CVPixelBufferRef in objective C, iOS

Stripe::AuthenticationError No API key provided. Set your API key using “Stripe.api_key = ”

SVG with two text elements. When one resizes due to textLength - how to resize the other one to the same character size