Moodle  2.2.1
http://www.collinsharper.com
SimpleAuthenticator Class Reference

Public Member Functions

 SimpleAuthenticator ()
 restartSession ()
 addRealm ($url, $type, $realm)
 setIdentityForRealm ($host, $realm, $username, $password)
 _findRealmFromUrl ($url)
 addHeaders (&$request, $url)

Static Public Member Functions

 addBasicHeaders (&$request, $username, $password)

Data Fields

 $_realms

Detailed Description

Definition at line 131 of file authentication.php.


Member Function Documentation

_findRealmFromUrl ( url)

Finds the name of the realm by comparing URLs.

Parameters:
SimpleUrl$urlURL to test.
Returns:
SimpleRealm Name of realm. private

Definition at line 191 of file authentication.php.

Here is the caller graph for this function:

addBasicHeaders ( &$  request,
username,
password 
) [static]

Presents the appropriate headers for this location for basic authentication.

Parameters:
SimpleHttpRequest$requestRequest to modify.
string$usernameUsername for realm.
string$passwordPassword for realm. public

Definition at line 231 of file authentication.php.

Here is the caller graph for this function:

addHeaders ( &$  request,
url 
)

Presents the appropriate headers for this location.

Parameters:
SimpleHttpRequest$requestRequest to modify.
SimpleUrl$urlBase of realm. public

Definition at line 209 of file authentication.php.

Here is the call graph for this function:

addRealm ( url,
type,
realm 
)

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.

Parameters:
SimpleUrl$urlBase of realm.
string$typeAuthentication type for this realm. Only Basic authentication is currently supported.
string$realmName of realm. public

Definition at line 166 of file authentication.php.

Starts with no realms set up. public

Definition at line 146 of file authentication.php.

Here is the caller graph for this function:

setIdentityForRealm ( host,
realm,
username,
password 
)

Sets the current identity to be presented against that realm.

Parameters:
string$hostServer hosting realm.
string$realmName of realm.
string$usernameUsername for realm.
string$passwordPassword for realm. public

Definition at line 179 of file authentication.php.

Clears the realms. public

Definition at line 138 of file authentication.php.

Here is the call graph for this function:


Field Documentation

$_realms

Definition at line 132 of file authentication.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations