Re: [fw-general] The Http adapter example from the docs is not working with digest ?!?

2007-09-04 Thread Truppe Steven

it now seems to work, the only problem left is how to reforce the login
dialog if "chancel" is pressed.

when i try to make a simple loop for ->authenticate() like:

$end = false;
while($end != true)
{
  $result = $a->authenticate();
  if ($result->isValid()) $end = true;
}

i never get the dialog login.

So my question is: where is the login dialog triggered in code and how
to solve the "chancel" use case ?
The complete code is inside a Controller Plugins /dispatchLoopStartup()/
method.


best regards,
Truppe Steven




till wrote:
> Hi,
>
> On 9/4/07, Truppe Steven <[EMAIL PROTECTED]> wrote:
>   
>> Hello again,
>>
>> i have now setup a local apache server with xdebug, and here the example
>> is working without code changes !!
>>
>> The online version is located on a subdomain, the local copy is just a
>> virtualhost. Maybe the Http Adapter for digest authentication can't
>> handle subdomains ?
>> 
>
> I don't know what difference it makes. I am rather guessing your
> problem is elsewhere. Mybe you can pastebin some code so people can
> help you.
>
>   
>> With the local copy i FINALY get a successful login with the right
>> credentials.
>>
>> Are there other modules than "hash" that are needed for this to work
>> properly ?
>> 
>
> I stumbled upon "hash" as well. I still believe that one of the
> advantages about distributing ZF using a PEAR channel would be proper
> dependency checking. Not just internally (so to speak package-wise)
> but also in relation to your PHP install. Because I did not have hash
> installed either and someone on the issue tracker claimed it was
> "common". ;-)
>
> Do you have your logs enabled and error_reporting set to E_ALL and
> E_STRICT? Because if there is an error, notice or warning it would end
> up there - if you don't see anything on the page while you load it. A
> fatal error is usually indicating a missing module.
>
> Cheers,
> Till
>
>   


Re: [fw-general] The Http adapter example from the docs is not working with digest ?!?

2007-09-04 Thread Truppe Steven

> I don't know what difference it makes. I am rather guessing your
> problem is elsewhere. Mybe you can pastebin some code so people can
> help you.
>   
The code is rater trivial. I've pasted it allready in this thread
(2007-09-03 21:28).


> Do you have your logs enabled and error_reporting set to E_ALL and
> E_STRICT? Because if there is an error, notice or warning it would end
> up there - if you don't see anything on the page while you load it. A
> fatal error is usually indicating a missing module.
>
> Cheers,
> Till
>
>   

The thing is i only get the "Invalid credentials or .." error message
(in $result = $this->_auth->authenticate()).

But only when i hit "chancel" or press the esc button. So the login
dialog is poping up endless (no mather if the user and password is set
correct).





Re: [fw-general] The Http adapter example from the docs is not working with digest ?!?

2007-09-04 Thread till
Hi,

On 9/4/07, Truppe Steven <[EMAIL PROTECTED]> wrote:
> Hello again,
>
> i have now setup a local apache server with xdebug, and here the example
> is working without code changes !!
>
> The online version is located on a subdomain, the local copy is just a
> virtualhost. Maybe the Http Adapter for digest authentication can't
> handle subdomains ?

I don't know what difference it makes. I am rather guessing your
problem is elsewhere. Mybe you can pastebin some code so people can
help you.

> With the local copy i FINALY get a successful login with the right
> credentials.
>
> Are there other modules than "hash" that are needed for this to work
> properly ?

I stumbled upon "hash" as well. I still believe that one of the
advantages about distributing ZF using a PEAR channel would be proper
dependency checking. Not just internally (so to speak package-wise)
but also in relation to your PHP install. Because I did not have hash
installed either and someone on the issue tracker claimed it was
"common". ;-)

Do you have your logs enabled and error_reporting set to E_ALL and
E_STRICT? Because if there is an error, notice or warning it would end
up there - if you don't see anything on the page while you load it. A
fatal error is usually indicating a missing module.

Cheers,
Till


Re: [fw-general] The Http adapter example from the docs is not working with digest ?!?

2007-09-04 Thread Truppe Steven
Hello again,

i have now setup a local apache server with xdebug, and here the example
is working without code changes !!

The online version is located on a subdomain, the local copy is just a
virtualhost. Maybe the Http Adapter for digest authentication can't
handle subdomains ? 

With the local copy i FINALY get a successful login with the right
credentials.

Are there other modules than "hash" that are needed for this to work
properly ?

best regards,
Truppe Steven



Truppe Steven wrote:
> Yes, the module is loaded.
>
> Bill Karwin wrote:
>   
>> Is your 'hash' PHP extension enabled?
>> The Zend_Auth_Adapter_Http requires that extension.
>>
>> Regards,
>> Bill Karwin 
>>
>>   
>> 
>>> -Original Message-
>>> From: Truppe Steven [mailto:[EMAIL PROTECTED] 
>>> Sent: Monday, September 03, 2007 8:27 AM
>>> To: fw-general@lists.zend.com
>>> Subject: [fw-general] The Http adapter example from the docs 
>>> is not working with digest ?!?
>>>
>>>
>>> Hi folks,
>>>
>>> i have a strange problem here:
>>>
>>> i now try for 2 days to get the simple example from the docs 
>>> working (), but i never get a successful login attemp with Digest!
>>>
>>> The only thing that looks strange to be is that the REALM 
>>> allways is MYREALM .= '-659'. So for the example from the 
>>> docs i get "Some Realm-659" in the HTTP Headers.
>>>
>>> Here is the code (just copied from the docs) and the file with the
>>> credentials:
>>>
>>>
>>> |_Resolver File Content
>>>
>>> _someUser:Some Realm:fde17b91c3a510ecbaf7dbd37f59d4f8
>>>
>>> _From my bootstrap file
>>>
>>> _>> require_once 'Zend/Auth/Adapter/Http.php';
>>> ||require_once 'Zend/Auth/Adapter/Http/Resolver/File.php';|
>>> |$path = '../etc/passwd';
>>> $resolver = new Zend_Auth_Adapter_Http_Resolver_File($path);
>>>
>>> ||$config = array(
>>> 'accept_schemes' => 'digest',
>>> 'realm'  => 'Some Realm',
>>> 'digest_domains' => '/ http://debug.byteshelter.org',
>>> 'nonce_timeout'  => 3600,
>>> );|
>>>
>>> |$adapter = new Zend_Auth_Adapter_Http($config);
>>> $adapter->setDigestResolver($digestResolver);
>>>
>>> ||assert($request instanceof Zend_Controller_Request_Http);
>>> assert($response instanceof Zend_Controller_Response_Http);
>>>
>>> $adapter->setRequest(Zend_Controller_Front::getInstance()->get
>>> Request());
>>> $adapter->setResponse(||Zend_Controller_Front::getInstance()->
>>> getResponse()||);
>>>
>>> $result = $adapter->authenticate();
>>>
>>> if (!$result->isValid()) {
>>> echo "SUCCESS!!";
>>> // Bad userame/password, or canceled password prompt 
>>> }else echo "FAILED";|
>>>
>>>
>>> This code is copied from the docs, but i never get a 
>>> successful login !!
>>> The docs says to use username="someUser", realm="Some Realm" 
>>> and credentials="somePassword".
>>>
>>> But i get no successful login !!
>>>
>>> The only thing i can say that looks a bit strange is that the 
>>> realm allways have '-659' attached in the HTTP headers.
>>>
>>> I hope someone can help me with this, i get cracy with this example !!
>>>
>>> I've also tried to put some log output from within the file 
>>> resolver (Zend/Auth/Adapter/Http/Resolver/File.php in the 
>>> resolve() method but the output is never shown in the logs !! 
>>> only the constructor of the file resolver outputs something 
>>> into the logs...
>>>
>>>
>>> I realy don't know what to do from this point, so i hope 
>>> someone can point me to the right direction.
>>>
>>>
>>> best regards,
>>> Truppe Steven
>>>
>>>
>>>
>>> |
>>>
>>>
>>>
>>> |
>>>
>>> 
>>>   
>>   
>> 
>
>   


Re: [fw-general] The Http adapter example from the docs is not working with digest ?!?

2007-09-03 Thread Truppe Steven
Yes, the module is loaded.

Bill Karwin wrote:
> Is your 'hash' PHP extension enabled?
> The Zend_Auth_Adapter_Http requires that extension.
>
> Regards,
> Bill Karwin 
>
>   
>> -Original Message-
>> From: Truppe Steven [mailto:[EMAIL PROTECTED] 
>> Sent: Monday, September 03, 2007 8:27 AM
>> To: fw-general@lists.zend.com
>> Subject: [fw-general] The Http adapter example from the docs 
>> is not working with digest ?!?
>>
>>
>> Hi folks,
>>
>> i have a strange problem here:
>>
>> i now try for 2 days to get the simple example from the docs 
>> working (), but i never get a successful login attemp with Digest!
>>
>> The only thing that looks strange to be is that the REALM 
>> allways is MYREALM .= '-659'. So for the example from the 
>> docs i get "Some Realm-659" in the HTTP Headers.
>>
>> Here is the code (just copied from the docs) and the file with the
>> credentials:
>>
>>
>> |_Resolver File Content
>>
>> _someUser:Some Realm:fde17b91c3a510ecbaf7dbd37f59d4f8
>>
>> _From my bootstrap file
>>
>> _> require_once 'Zend/Auth/Adapter/Http.php';
>> ||require_once 'Zend/Auth/Adapter/Http/Resolver/File.php';|
>> |$path = '../etc/passwd';
>> $resolver = new Zend_Auth_Adapter_Http_Resolver_File($path);
>>
>> ||$config = array(
>> 'accept_schemes' => 'digest',
>> 'realm'  => 'Some Realm',
>> 'digest_domains' => '/ http://debug.byteshelter.org',
>> 'nonce_timeout'  => 3600,
>> );|
>>
>> |$adapter = new Zend_Auth_Adapter_Http($config);
>> $adapter->setDigestResolver($digestResolver);
>>
>> ||assert($request instanceof Zend_Controller_Request_Http);
>> assert($response instanceof Zend_Controller_Response_Http);
>>
>> $adapter->setRequest(Zend_Controller_Front::getInstance()->get
>> Request());
>> $adapter->setResponse(||Zend_Controller_Front::getInstance()->
>> getResponse()||);
>>
>> $result = $adapter->authenticate();
>>
>> if (!$result->isValid()) {
>> echo "SUCCESS!!";
>> // Bad userame/password, or canceled password prompt 
>> }else echo "FAILED";|
>>
>>
>> This code is copied from the docs, but i never get a 
>> successful login !!
>> The docs says to use username="someUser", realm="Some Realm" 
>> and credentials="somePassword".
>>
>> But i get no successful login !!
>>
>> The only thing i can say that looks a bit strange is that the 
>> realm allways have '-659' attached in the HTTP headers.
>>
>> I hope someone can help me with this, i get cracy with this example !!
>>
>> I've also tried to put some log output from within the file 
>> resolver (Zend/Auth/Adapter/Http/Resolver/File.php in the 
>> resolve() method but the output is never shown in the logs !! 
>> only the constructor of the file resolver outputs something 
>> into the logs...
>>
>>
>> I realy don't know what to do from this point, so i hope 
>> someone can point me to the right direction.
>>
>>
>> best regards,
>> Truppe Steven
>>
>>
>>
>> |
>>
>>
>>
>> |
>>
>> 
>
>   


RE: [fw-general] The Http adapter example from the docs is not working with digest ?!?

2007-09-03 Thread Bill Karwin
Is your 'hash' PHP extension enabled?
The Zend_Auth_Adapter_Http requires that extension.

Regards,
Bill Karwin 

> -Original Message-
> From: Truppe Steven [mailto:[EMAIL PROTECTED] 
> Sent: Monday, September 03, 2007 8:27 AM
> To: fw-general@lists.zend.com
> Subject: [fw-general] The Http adapter example from the docs 
> is not working with digest ?!?
> 
> 
> Hi folks,
> 
> i have a strange problem here:
> 
> i now try for 2 days to get the simple example from the docs 
> working (), but i never get a successful login attemp with Digest!
> 
> The only thing that looks strange to be is that the REALM 
> allways is MYREALM .= '-659'. So for the example from the 
> docs i get "Some Realm-659" in the HTTP Headers.
> 
> Here is the code (just copied from the docs) and the file with the
> credentials:
> 
> 
> |_Resolver File Content
> 
> _someUser:Some Realm:fde17b91c3a510ecbaf7dbd37f59d4f8
> 
> _From my bootstrap file
> 
> _ require_once 'Zend/Auth/Adapter/Http.php';
> ||require_once 'Zend/Auth/Adapter/Http/Resolver/File.php';|
> |$path = '../etc/passwd';
> $resolver = new Zend_Auth_Adapter_Http_Resolver_File($path);
> 
> ||$config = array(
> 'accept_schemes' => 'digest',
> 'realm'  => 'Some Realm',
> 'digest_domains' => '/ http://debug.byteshelter.org',
> 'nonce_timeout'  => 3600,
> );|
> 
> |$adapter = new Zend_Auth_Adapter_Http($config);
> $adapter->setDigestResolver($digestResolver);
> 
> ||assert($request instanceof Zend_Controller_Request_Http);
> assert($response instanceof Zend_Controller_Response_Http);
> 
> $adapter->setRequest(Zend_Controller_Front::getInstance()->get
> Request());
> $adapter->setResponse(||Zend_Controller_Front::getInstance()->
> getResponse()||);
> 
> $result = $adapter->authenticate();
> 
> if (!$result->isValid()) {
> echo "SUCCESS!!";
> // Bad userame/password, or canceled password prompt 
> }else echo "FAILED";|
> 
> 
> This code is copied from the docs, but i never get a 
> successful login !!
> The docs says to use username="someUser", realm="Some Realm" 
> and credentials="somePassword".
> 
> But i get no successful login !!
> 
> The only thing i can say that looks a bit strange is that the 
> realm allways have '-659' attached in the HTTP headers.
> 
> I hope someone can help me with this, i get cracy with this example !!
> 
> I've also tried to put some log output from within the file 
> resolver (Zend/Auth/Adapter/Http/Resolver/File.php in the 
> resolve() method but the output is never shown in the logs !! 
> only the constructor of the file resolver outputs something 
> into the logs...
> 
> 
> I realy don't know what to do from this point, so i hope 
> someone can point me to the right direction.
> 
> 
> best regards,
> Truppe Steven
> 
> 
> 
> |
> 
> 
> 
> |
> 


Re: [fw-general] The Http adapter example from the docs is not working with digest ?!?

2007-09-03 Thread Truppe Steven
I've noticed another problem:

When i comment all lines in the passwd.txt file i get no error message
telling me that the file has no content (all lines are commented with #).

Is this normal ?


best regards,
Truppe Steven