Download PDF via browser authentication using javascript

I understand that I can authenticate the browser with Javascript and then grab, say, an XML file with that javascript. My use case is slightly different: there is a link to a web page in PDF on another server. This server performs browser authentication. The username and password are NOT secrets, because right now we are publishing the link as follows:

"Download PDF (use guest / guest as username / password)".

What I need: the user clicks the link but does NOT have to fill in the username / password because we see a lot of users get confused by this (in usability tests).

We do not have access to another server hosting the PDF file.

Any ideas?

+1


source to share


3 answers


You can write a link like this: http: // gast: gast@mis.vlaanderen.be /cognos7/metadata/mp_v_i_im_020_e100_az_algemeen_overzicht.pdf



+1


source


This url is a test one: http://mis.vlaanderen.be/cognos7/metadata/mp_v_i_im_020_e100_az_algemeen_overzicht.pdf

The username is "gast", the password is "gast" (as specified in the authentication window).



If you can embed this in a page in a link and open it without launching a browser authentication window, you are my hero :)

0


source


0


source







All Articles