JSF - Supply basic http authentication

Multi tool use


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.