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

_<?php
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()->getRequest());
$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



|



|

Reply via email to