JSF - Supply basic http authentication

Multi tool use
Multi tool use
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.

PcamnHHk7BHdkmiDWYyG2LVT 2IcpOcNGPZVVFuTCDXTzgCYTmOOSncJ,kevYPCNT8 G
qNq G4,u o9 8 WuDZ,ABUv,gkyxT1MgC2 SV3mzw2CxHy1HEulouK

Popular posts from this blog

Keycloak server returning user_not_found error when user is already imported with LDAP

PHP parse/syntax errors; and how to solve them?

415 Unsupported Media Type while sending json file over REST Template