[Web4lib] creating a link that bypasses username and password
page
Dan Field
dof at llgc.org.uk
Fri Jul 7 06:36:19 EDT 2006
John Fitzgibbon wrote:
> Hi,
>
> We use WinU on our Internet PCs.
>
> We wish to add a button, in WinU, that launches Internet Explorer but
> opens a page that is password protected. We are legally entitled to use
> this page from within our library.
>
> We know the web page that 'acts' on the form. It uses the http protocol,
> not SSL. The form uses the post method. We know the field names for user
> name and password and what the values for those fields should be.
>
> Can this information be included in the parameter line or alternatively
> can it be embedded in the URL?
>
> I would rather solve the problem without creating a web page wherein the
> form is hidden and automatically submitted. Such a page would have to be
> stored on each PC and this is cumbersome; storing it on the web would
> not be legal as anyone can access the resource.
A URL can be constructed for HTTP authentication (as found in Apache
.htaccess files for example) like so:
http://username:password@host.domain.tld/path/to/file
However, there is no way to submit POST form data within a URL, but you
can for GET i.e:
http://host.domain.tld/path/to/file?username=myuser&password=mypassword
where 'username' and 'password' are form id fields.
Sorry I can't be of more help. There may be a bespoke way of achieving
this but AFAIK it is beyond the scope of a standard URL
--
Dan Field <dof at llgc.org.uk> Tel. +44 1970 632 582
Datblygwr Systemau Systems Developer
Llyfrgell Genedlaethol Cymru National Library of Wales
More information about the Web4lib
mailing list