By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,317 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,317 IT Pros & Developers. It's quick & easy.

set logon credentials for the page your posting to....

P: n/a
I have a link that refers to a page that requires authentication. Is
there a way to set the logon credentials prior to or while posting to
a new web page....

My users are clicking on the link and are then asked to enter a
username and password. We all use the same generic password.
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Lee
Peter said:

I have a link that refers to a page that requires authentication. Is
there a way to set the logon credentials prior to or while posting to
a new web page....

My users are clicking on the link and are then asked to enter a
username and password. We all use the same generic password.


That would allow you to subscribe to some sort of pay web site and then allow
all of your friends to link through your site to the pay site, using your
password. You could even charge people to use your site to access the other pay
site.

In general, if you can think of such a simple way to abuse a capability, so did
the people who designed the system, and so you can't do it.

Jul 23 '05 #2

P: n/a
Peter wrote:
I have a link that refers to a page that requires authentication. Is
there a way to set the logon credentials prior to or while posting to
a new web page....

My users are clicking on the link and are then asked to enter a
username and password. We all use the same generic password.


You can do this from the server, but not from the client.

If all you were doing is POSTing data to a server that requires
authentication, then it's trival to produce a base64-encoded
"Authorization: Basic ..." header and POST the data to the server.

If you want the result of the POST, that's a little more complicated.

If you want to show a user the result of the POST in a way that looks
like a normal Web page, that gets more difficult still. It's not a simple
matter of trapping the resulting HTML and writing it to the user, since
any relative links on the page need to be fixed to refer to the server
from which they came (and may which also require authentication). So you
end up needing to re-write all the HREF's on the page to go through your
redirector.

--
| Grant Wagner <gw*****@agricoreunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.