| [ Index ] |
PHP Cross Reference of Limb3 |
[Source view] [Print] [Project Stats]
Base include file for SimpleTest
| Version: | $Id: authentication.php 5999 2007-06-18 13:13:08Z pachanga $ |
| File Size: | 238 lines (9 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
SimpleRealm:: (8 methods):
SimpleRealm()
stretch()
_getCommonPath()
setIdentity()
getUsername()
getPassword()
isWithin()
_isIn()
SimpleAuthenticator:: (7 methods):
SimpleAuthenticator()
restartSession()
addRealm()
setIdentityForRealm()
_findRealmFromUrl()
addHeaders()
addBasicHeaders()
Class: SimpleRealm - X-Ref
Represents a single security realm's identity.| SimpleRealm($type, $url) X-Ref |
| Starts with the initial entry directory. param: string $type Authentication type for this param: SimpleUrl $url Somewhere in realm. |
| stretch($url) X-Ref |
| Adds another location to the realm. param: SimpleUrl $url Somewhere in realm. |
| _getCommonPath($first, $second) X-Ref |
| Finds the common starting path. param: string $first Path to compare. param: string $second Path to compare. return: string Common directories. |
| setIdentity($username, $password) X-Ref |
| Sets the identity to try within this realm. param: string $username Username in authentication dialog. param: string $username Password in authentication dialog. |
| getUsername() X-Ref |
| Accessor for current identity. return: string Last succesful username. |
| getPassword() X-Ref |
| Accessor for current identity. return: string Last succesful password. |
| isWithin($url) X-Ref |
| Test to see if the URL is within the directory tree of the realm. param: SimpleUrl $url URL to test. return: boolean True if subpath. |
| _isIn($part, $whole) X-Ref |
| Tests to see if one string is a substring of another. param: string $part Small bit. param: string $whole Big bit. return: boolean True if the small bit is |
Class: SimpleAuthenticator - X-Ref
Manages security realms.| SimpleAuthenticator() X-Ref |
| Clears the realms. |
| restartSession() X-Ref |
| Starts with no realms set up. |
| addRealm($url, $type, $realm) X-Ref |
| 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. param: SimpleUrl $url Base of realm. param: string $type Authentication type for this param: string $realm Name of realm. |
| setIdentityForRealm($host, $realm, $username, $password) X-Ref |
| Sets the current identity to be presented against that realm. param: string $host Server hosting realm. param: string $realm Name of realm. param: string $username Username for realm. param: string $password Password for realm. |
| _findRealmFromUrl($url) X-Ref |
| Finds the name of the realm by comparing URLs. param: SimpleUrl $url URL to test. return: SimpleRealm Name of realm. |
| addHeaders(&$request, $url) X-Ref |
| Presents the appropriate headers for this location. param: SimpleHttpRequest $request Request to modify. param: SimpleUrl $url Base of realm. |
| addBasicHeaders(&$request, $username, $password) X-Ref |
| Presents the appropriate headers for this location for basic authentication. param: SimpleHttpRequest $request Request to modify. param: string $username Username for realm. param: string $password Password for realm. |
| Generated: Tue Oct 14 04:47:40 2008 | Cross-referenced by PHPXref 0.7 |