Zeta Components Manual :: Docs For Class ezcWebdavDigestAuthenticatorBase
Webdav::ezcWebdavDigestAuthenticatorBase
Class ezcWebdavDigestAuthenticatorBase
Base class for ezcWebdavDigestAuthenticator implementations.
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.
Source for this file: /Webdav/src/auth/digest_base.php
Implements interfaces:
Version: | //autogen// |
Method Summary
protected bool |
checkDigest(
$data
, $password
)
Calculates the digest according to $data and $password and checks it. |
Methods
checkDigest
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 |