Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Peter
Guest
 
Posts: n/a
#1: Jul 23 '05
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.

Lee
Guest
 
Posts: n/a
#2: Jul 23 '05

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


Peter said:[color=blue]
>
>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.[/color]

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.

Grant Wagner
Guest
 
Posts: n/a
#3: Jul 23 '05

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


Peter wrote:
[color=blue]
> 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.[/color]

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 <gwagner@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


Closed Thread