Auth_HTTP
[ class tree: Auth_HTTP ] [ index: Auth_HTTP ] [ all elements ]

Class: Auth_HTTP

Source Location: /Auth_HTTP-2.1.3rc1/Auth_HTTP.php

Class Overview

Auth
   |
   --Auth_HTTP

PEAR::Auth_HTTP


Author(s):

Version:

  • $Revision: 1.20 $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 54]
PEAR::Auth_HTTP

The PEAR::Auth_HTTP class provides methods for creating an HTTP authentication system based on RFC-2617 using PHP.

Instead of generating an HTML driven form like PEAR::Auth does, this class sends header commands to the clients which cause them to present a login box like they are e.g. used in Apache's .htaccess mechanism.

This class requires the PEAR::Auth package.



[ Top ]


Class Variables

$auth = array()

[line 123]

authorization info returned by the client
  • Access: public

Type:   array


[ Top ]

$authType =  'basic'

[line 65]

Authorization method: 'basic' or 'digest'
  • Access: public

Type:   string


[ Top ]

$CancelText =  "Error 401 - Access denied"

[line 83]

Text to send if user hits cancel button

Type:   string


[ Top ]

$cookie =

[line 157]

Holds a reference to the global cookie variable

Type:   array


[ Top ]

$nextNonce =  ''

[line 131]

next nonce value
  • Access: public

Type:   string


[ Top ]

$nonce =  ''

[line 139]

nonce value
  • Access: public

Type:   string


[ Top ]

$opaque =  'dummy'

[line 107]

opaque string for digest authentication
  • Access: public

Type:   string


[ Top ]

$options = array()

[line 91]

option array
  • Access: public

Type:   array


[ Top ]

$post =

[line 151]

Holds a reference to the global post variable

Type:   array


[ Top ]

$realm =  "protected area"

[line 74]

Name of the realm for Basic Authentication

Type:   string


[ Top ]

$server =

[line 145]

Holds a reference to the global server variable

Type:   array


[ Top ]

$stale =  false

[line 99]

flag to indicate the nonce was stale.
  • Access: public

Type:   bool


[ Top ]

$uri =  ''

[line 115]

digest URI
  • Access: public

Type:   string


[ Top ]



Method Detail

Auth_HTTP (Constructor)   [line 173]

void Auth_HTTP( string $storageDriver, [mixed $options = ''])

Constructor

Parameters:

string   $storageDriver     Type of the storage driver
mixed   $options     Additional options for the storage driver (example: if you are using DB as the storage driver, you have to pass the dsn string here)

[ Top ]

assignData   [line 214]

void assignData( )

Assign values from $PHP_AUTH_USER and $PHP_AUTH_PW or 'Authorization' header to internal variables and sets the session id based on them

[ Top ]

authenticationInfo   [line 667]

void authenticationInfo( [string $contentMD5 = ''])

output HTTP Authentication-Info header
  • Access: public

Parameters:

string   $contentMD5     MD5 hash of content

[ Top ]

drawLogin   [line 434]

void drawLogin( [string $username = ""])

Launch the login box

Parameters:

string   $username     Username

[ Top ]

getOption   [line 731]

mixed getOption( string $name)

get authentication option
  • Return: option value
  • Access: public

Parameters:

string   $name     key of option

[ Top ]

selfURI   [line 753]

string selfURI( )

get self URI
  • Return: self URI
  • Access: public

[ Top ]

setCancelText   [line 505]

void setCancelText( string $text)

Set the text to send if user hits the cancel button
  • Access: public

Parameters:

string   $text     Text to send

[ Top ]

setOption   [line 707]

void setOption( mixed $name, [mixed $value = null])

set authentication option
  • Access: public

Parameters:

mixed   $name     key of option
mixed   $value     value of option

[ Top ]

setRealm   [line 487]

void setRealm( string $realm, [string $digestRealm = ''])

Set name of the current realm
  • Access: public

Parameters:

string   $realm     Name of the realm
string   $digestRealm     Name of the realm for digest authentication

[ Top ]

validateDigest   [line 521]

bool validateDigest( string $response, string $a1)

judge if the client response is valid.
  • Return: true if success, false otherwise
  • Access: public

Parameters:

string   $response     client response
string   $a1     password or hashed password stored in container

[ Top ]


Documentation generated on Sun, 22 Aug 2004 09:10:05 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.