Zeta Components - high quality PHP components

Zeta Components Manual :: Docs For Class ezcWebdavDigestAuth

Webdav::ezcWebdavDigestAuth

Class ezcWebdavDigestAuth

Struct containing digest authentication information.

This struct represents authentication data as provided by the HTTP Digest specification.

Source for this file: /Webdav/src/structs/digest_auth.php

ezcBaseStruct
   |
   --ezcWebdavAuth
      |
      --ezcWebdavDigestAuth
Version:   //autogen//

Member Variables

public string $algorithm
This should be MD5, since we only allow this one.

You should safely ignore this property.

public string $clientNonce
Request nonce generated by client (cnonce header field).
public mixed $nonce
The nounce used to hash the password.
public string $nonceCount
Serial number of the request (nc header field).
public string $opaque
Opaque value.

Generated by the server and re-submitted by the client as is, to verify correct communication.

public string $qualityOfProtection
The qop field of the request.
public string $realm
The authentication realm used.
public string $requestMethod
The method of the current request.
public string $response
The response hash.

This is the authentication value itself. It is a MD5 hashed version of the following string:

  1.  <?php
  2.  $ha1      := md5( "$username:$realm:$password" );
  3.  $ha2      := md5( "$method:$uri" );
  4.  $response := md5( "$ha1:$nonce:$nonceCount:$clientNonce:$qop:$ha2" );
  5.  ?>
public string $uri
The request URI.

Attention! This URI is not translated into a local path by the transport layer, since this would affect the hashing of $repsonse.

Inherited Member Variables

From ezcWebdavAuth
public ezcWebdavAuth::$username

Method Summary

public ezcWebdavDigestAuth __construct( [ $requestMethod = ''] , [ $username = ''] , [ $realm = ''] , [ $nonce = ''] , [ $uri = ''] , [ $response = ''] , [ $algorithm = 'MD5'] , [ $qualityOfProtection = null] , [ $nonceCount = null] , [ $clientNonce = null] , [ $opaque = null] )
Creates a new credential struct for digest authentication.

Inherited Methods

From ezcWebdavAuth
public ezcWebdavAuth ezcWebdavAuth::__construct()
Creates a new credential struct.

Methods

__construct

ezcWebdavDigestAuth __construct( [string $requestMethod = ''] , [string $username = ''] , [string $realm = ''] , [string $nonce = ''] , [string $uri = ''] , [string $response = ''] , [string $algorithm = 'MD5'] , [string $qualityOfProtection = null] , [string $nonceCount = null] , [string $clientNonce = null] , [string $opaque = null] )

Creates a new credential struct for digest authentication.

Receives the information stored in the digest authentication header. See attributes for further details.

Parameters:
Name Type Description
$requestMethod string
$username string
$realm string
$nonce string
$uri string
$response string
$algorithm string
$qualityOfProtection string
$nonceCount string
$clientNonce string
$opaque string
Redefinition of:
Method Description
ezcWebdavAuth::__construct() Creates a new credential struct.
Documentation generated by phpDocumentor 1.4.3