Class SimpleAuthenticator

Description

Manages security realms.

Located in /libraries/pear/simpletest/authentication.php (line 112)


	
			
Variable Summary
 mixed $_realms
Method Summary
 SimpleAuthenticator SimpleAuthenticator ()
 void addBasicHeaders (SimpleHttpRequest &$request, string $username, string $password)
 void addHeaders (SimpleHttpRequest &$request, SimpleUrl $url)
 void addRealm (SimpleUrl $url, string $type, string $realm)
 void setIdentityForRealm (string $host, string $realm, string $username, string $password)
Variables
mixed $_realms (line 113)
Methods
Constructor SimpleAuthenticator (line 119)

Starts with no realms set up.

  • access: public
SimpleAuthenticator SimpleAuthenticator ()
addBasicHeaders (line 204)

Presents the appropriate headers for this location for basic authentication.

  • static:
  • access: public
void addBasicHeaders (SimpleHttpRequest &$request, string $username, string $password)
  • SimpleHttpRequest $request: Request to modify.
  • string $username: Username for realm.
  • string $password: Password for realm.
addHeaders (line 182)

Presents the appropriate headers for this location.

  • access: public
void addHeaders (SimpleHttpRequest &$request, SimpleUrl $url)
addRealm (line 139)

Adds a new realm centered the current URL.

Browsers vary wildly on their behaviour in this regard. Mozilla ignores the realm and presents only when challenged, wasting bandwidth. IE just carries on presenting until a new challenge occours. SimpleTest tries to follow the spirit of the original standards committee and treats the base URL as the root of a file tree shaped realm.

  • access: public
void addRealm (SimpleUrl $url, string $type, string $realm)
  • SimpleUrl $url: Base of realm.
  • string $type: Authentication type for this realm. Only Basic authentication is currently supported.
  • string $realm: Name of realm.
setIdentityForRealm (line 152)

Sets the current identity to be presented against that realm.

  • access: public
void setIdentityForRealm (string $host, string $realm, string $username, string $password)
  • string $host: Server hosting realm.
  • string $realm: Name of realm.
  • string $username: Username for realm.
  • string $password: Password for realm.
_findRealmFromUrl (line 164)

Finds the name of the realm by comparing URLs.

  • return: Name of realm.
  • access: private
SimpleRealm _findRealmFromUrl (SimpleUrl $url)

Documentation generated on Fri, 11 Feb 2005 18:12:44 +0000 by phpDocumentor 1.3.0RC3