Path

ez components / documentation / api reference / trunk / webdav


eZ Components trunk

Webdav: ezcWebdavDigestAuthenticatorBase

[ Tutorial ] [ Clients ] [ Plugin architecture ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

Class: ezcWebdavDigestAuthenticatorBase

Base class for ezcWebdavDigestAuthenticator implementations. [source]

Implemented Interfaces

This base class provides a method for calculating and checking of digest information. If you don't want to implement the necessary algorithms yourself, you can extend this base class.
It is recommended to perform the digest calculation outside of PHPs scope to not load the clear text passwords into PHP memory. One possibility would be to use a stored procedure in your database. However, you might not have this possibility.

Method Summary

protected bool checkDigest( $data, $password )
Calculates the digest according to $data and $password and checks it.

Methods

checkDigest

bool checkDigest( ezcWebdavDigestAuth $data, string $password )
Calculates the digest according to $data and $password and checks it.
This method receives digest data in $data and a plain text $password for the digest user. It automatically calculates the digest and veryfies it against the $response property of $data.
The method returns true, if the digest matched the response, otherwise false.
Use this helper method to avoid manually calculating the digest yourself. The submitted $data should be received by authenticateDigest() and the $password should be read from your authentication back end.
For security reasons it is recommended to calculate and verify the digest somewhere else (e.g. in a stored procedure in your database), without loading it as plain text into PHP memory.

Parameters

Name Type Description
$data ezcWebdavDigestAuth  
$password string  

Last updated: Mon, 21 Dec 2009