[PHP] Re: PHP Auth

2004-04-24 Thread Rainer Müller
Anton Krall schrieb:
Guys.
 
Im doing a small php auth system and I was wondering, how can avoid having
to do a form to pass the user and pw to the php scripts and just use the
popup auth windows on IE and NS? do you remember the names of the vars that
get passed thru that popup or how can I invoke it?
 
Thx!
This is called "Basic Auth" and google should give you some infos.

Rainer

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


[PHP] Re: PHP Auth problem

2001-09-21 Thread Richard Lynch

If your code doesn't look like this:
http://www.php.net/manual/en/features.http-auth.php
you did it wrong.
Replace the == test with your imap_open, but don't go re-arranging the
if/else logic or the header() order.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Alex Sofronie <[EMAIL PROTECTED]>
Newsgroups: php.general
To: PHP General Mailing List <[EMAIL PROTECTED]>
Sent: Saturday, September 15, 2001 5:50 PM
Subject: PHP Auth problem


> Hi all
>
> I have a rather strange problem with php auth:
>
> i want to authenticate a user through php and validate it through
> imap_open function (to access his email).
> I send WWW-Authenticate header like this:
>
> header("WWW-Authenticate: Basic Realm=\"Private\"");
>
>
> After, i check for isset($PHP_AUTH_USER) and validate it through PHP.
>
> Can anyone tell me why, for a real user (it really exists), the
> authentication simply fails and asks me again for a username and password,
> without even leaving the authenticate intrinsic routine (the script just
> keeps telling me that the auth is failed, but WITHOUT running imap_open or
> any other part of the script).
>
> Why is that?
>
> If anyone has the time and the understanding, i can post the code
> fragment.
> Thanks
>
> -
>Alexandru SOFRONIE
>  [EMAIL PROTECTED]
> -
> IT Software Dept.
>   Omega-Tehnoton GROUP
>  +40-93-670773
> -
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP auth logout

2001-08-30 Thread Richard Lynch

> Thanks for all the answers to this question but hitting the back button
will
> work, no authorization required to see the pages all over.

You need to get those pages to not be cached by the browser.
http://php.net/header

> Repost problem:
> I'm having a PHP based auth. It seems that unset($PHP_AUTH_USER) or
> unset($PHP_AUTH_PW) doesn't work.

The *BROWSER* re-sends those variables, so your unset() has no meaning on
the next page.

> Also, 401 Unauthorized header does not
> work also.

What you need to do is re-send the challenge headers, *ONLY* with a new
*REALM*.

IE, keep track of what realm each user is in, and change it when you want
them to be logged out.

> Is there a way to logout and no back button or the user just have to close
> his browser in order to accomplish this?

Closing the browser is the best answer.  You'll never get 100% no back
button caching on every single minor browser release.

--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]