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

Class: Auth_HTTP

Source Location: /Auth_HTTP-2.1.0/Auth_HTTP.php

Class Overview

Auth
   |
   --Auth_HTTP

PEAR::Auth_HTTP


Author(s):

Version:

  • $Revision: 1.17 $

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 ]

$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 ]

$realm =  "protected area"

[line 74]

Name of the realm for Basic Authentication

Type:   string


[ 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 154]

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 195]

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 634]

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

output HTTP Authentication-Info header
  • Access: public

Parameters:

string   $contentMD5   —  MD5 hash of content

[ Top ]

drawLogin   [line 409]

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

Launch the login box

Parameters:

string   $username   —  Username

[ Top ]

getOption   [line 699]

mixed getOption( string $name)

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

Parameters:

string   $name   —  key of option

[ Top ]

setCancelText   [line 480]

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 675]

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 462]

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 496]

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 Mon, 11 Mar 2019 10:16:59 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.