Class SimpleAuthenticator

Description

Manages security realms.

Located in /authentication.php (line 131)


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

Presents the appropriate headers for this location for basic authentication.

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

Clears the realms.

  • access: public
SimpleAuthenticator SimpleAuthenticator ()
addHeaders (line 209)

Presents the appropriate headers for this location.

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

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.
restartSession (line 146)

Starts with no realms set up.

  • access: public
void restartSession ()
setIdentityForRealm (line 179)

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.

Documentation generated on Sun, 04 May 2008 09:21:15 -0500 by phpDocumentor 1.3.0