basic authentication and redirection

basic authentication and redirection

am 03.03.2010 20:25:26 von Bill Rausch

Hi there,

In certain circumstances controlled by my users, I'd like to redirect
my users to another site, a third party whom we have contracted with.
The second site uses basic authentication with a simple username and
password. Can I write my PHP code so my users do not have to login
(or even know the username/password) on the remote site?

This isn't intended to stop serious hackers, just enough security to
stop casual passers-by.

Thanks,

Bill


--
Bill Rausch

We first make our habits and then our habits make us. --John Dryden

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: basic authentication and redirection

am 03.03.2010 20:52:43 von Rene Veerman

depends on how that site does its authentication...

if it's a form, it may need an extra setting to allow you to go to a
specific page on that site after authentication.

On Wed, Mar 3, 2010 at 8:25 PM, Bill Rausch wrote:
>
>
> Hi there,
>
> In certain circumstances controlled by my users, I'd like to redirect my
> users to another site, a third party whom we have contracted with. The
> second site uses basic authentication with a simple username and password.
> Can I write my PHP code so my users do not have to login (or even know the
> username/password) on the remote site?
>
> This isn't intended to stop serious hackers, just enough security to stop
> casual passers-by.
>
> Thanks,
>
> Bill
>
>
> --
> Bill Rausch
>
> We first make our habits and then our habits make us. --John Dryden
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: basic authentication and redirection

am 03.03.2010 21:20:01 von Jay Blanchard

[snip]
In certain circumstances controlled by my users, I'd like to redirect=20
my users to another site, a third party whom we have contracted with.=20
The second site uses basic authentication with a simple username and=20
password. Can I write my PHP code so my users do not have to login=20
(or even know the username/password) on the remote site?

This isn't intended to stop serious hackers, just enough security to=20
stop casual passers-by.
[/snip]

Have a look at cURL (http://www.php.net/curl) as it will allow you to
perform remote POST's which may be enough to get you through.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: basic authentication and redirection

am 03.03.2010 21:24:05 von Robert Cummings

Jay Blanchard wrote:
> [snip]
> In certain circumstances controlled by my users, I'd like to redirect
> my users to another site, a third party whom we have contracted with.
> The second site uses basic authentication with a simple username and
> password. Can I write my PHP code so my users do not have to login
> (or even know the username/password) on the remote site?
>
> This isn't intended to stop serious hackers, just enough security to
> stop casual passers-by.
> [/snip]
>
> Have a look at cURL (http://www.php.net/curl) as it will allow you to
> perform remote POST's which may be enough to get you through.

Or you can use JavaScript on an intermediate page to post directly to
the remote site's login form. If JavaScript is disabled, just have a
button "Please continue to XXX" which then performs the post tot he
remote site.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php