Class SimpleAuthenticator

Description

Manages security realms.

Located in /authentication.php (line 131)


	
			
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)
Methods
static addBasicHeaders (line 230)

Presents the appropriate headers for this location for basic authentication.

  • access: public
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 privatey 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.
findRealmFromUrl (line 191)

Finds the name of the realm by comparing URLs.

  • return: Name of realm.
  • access: protected
SimpleRealm findRealmFromUrl (SimpleUrl $url)
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, 31 Oct 2010 16:30:54 -0500 by phpDocumentor 1.4.3