SecurityComponent Class Reference

Inheritance diagram for SecurityComponent:

Object

List of all members.


Public Member Functions

 blackHole (&$controller, $error= '')
 generateDigestResponseHash ($data)
 loginCredentials ($type=null)
 loginRequest ($options=array())
 parseDigestAuthData ($digest)
 requireAuth ()
 requireDelete ()
 requireGet ()
 requireLogin ()
 requirePost ()
 requirePut ()
 requireSecure ()
 startup (&$controller)

Public Attributes

 $allowedActions = array()
 $allowedControllers = array()
 $blackHoleCallback = null
 $components = array('RequestHandler', 'Session')
 $disabledFields = array()
 $loginOptions = array('type' => '', 'prompt' => null)
 $loginUsers = array()
 $requireAuth = array()
 $requireDelete = array()
 $requireGet = array()
 $requireLogin = array()
 $requirePost = array()
 $requirePut = array()
 $requireSecure = array()

Detailed Description

Definition at line 37 of file security.php.


Member Function Documentation

SecurityComponent::blackHole ( &$  controller,
error = '' 
)

Black-hole an invalid request with a 404 error or custom callback. If SecurityComponent::$blackHoleCallback is specified, it will use this callback by executing the method indicated in $error

Parameters:
object $controller Instantiating controller
string $error Error method
Returns:
mixed If specified, controller blackHoleCallback's response, or no return otherwise public
See also:
SecurityComponent::$blackHoleCallback

Definition at line 362 of file security.php.

SecurityComponent::generateDigestResponseHash ( data  ) 

Generates a hash to be compared with an HTTP digest-authenticated response

Parameters:
array $data HTTP digest response data, as parsed by SecurityComponent::parseDigestAuthData()
Returns:
string Digest authentication hash public
See also:
SecurityComponent::parseDigestAuthData()

Definition at line 345 of file security.php.

SecurityComponent::loginCredentials ( type = null  ) 

Attempts to validate the login credentials for an HTTP-authenticated request

Parameters:
string $type Either 'basic', 'digest', or null. If null/empty, will try both.
Returns:
mixed If successful, returns an array with login name and password, otherwise null. public

Definition at line 258 of file security.php.

References env(), and parseDigestAuthData().

SecurityComponent::loginRequest ( options = array()  ) 

Generates the text of an HTTP-authentication request header from an array of options..

Parameters:
array $options Set of options for header
Returns:
string HTTP-authentication request header public

Definition at line 296 of file security.php.

References $out.

SecurityComponent::parseDigestAuthData ( digest  ) 

Parses an HTTP digest authentication response, and returns an array of the data, or null on failure.

Parameters:
string $digest Digest authentication response
Returns:
array Digest authentication parameters public

Definition at line 317 of file security.php.

Referenced by loginCredentials().

SecurityComponent::requireAuth (  ) 

Sets the actions that require an authenticated request, or empty for all actions

public

Definition at line 225 of file security.php.

SecurityComponent::requireDelete (  ) 

Sets the actions that require a DELETE request, or empty for all actions

public

Definition at line 207 of file security.php.

SecurityComponent::requireGet (  ) 

Sets the actions that require a GET request, or empty for all actions

public

Definition at line 189 of file security.php.

SecurityComponent::requireLogin (  ) 

Sets the actions that require an HTTP-authenticated request, or empty for all actions

public

Definition at line 234 of file security.php.

SecurityComponent::requirePost (  ) 

Sets the actions that require a POST request, or empty for all actions

public

Definition at line 180 of file security.php.

SecurityComponent::requirePut (  ) 

Sets the actions that require a PUT request, or empty for all actions

public

Definition at line 198 of file security.php.

SecurityComponent::requireSecure (  ) 

Sets the actions that require a request that is SSL-secured, or empty for all actions

public

Definition at line 216 of file security.php.

SecurityComponent::startup ( &$  controller  ) 

Component startup. All security checking happens here.

Parameters:
object $controller Instantiating controller public

Definition at line 162 of file security.php.

References params().


Member Data Documentation

SecurityComponent::$allowedActions = array()

Definition at line 135 of file security.php.

SecurityComponent::$allowedControllers = array()

Definition at line 126 of file security.php.

SecurityComponent::$blackHoleCallback = null

Definition at line 44 of file security.php.

SecurityComponent::$components = array('RequestHandler', 'Session')

Definition at line 149 of file security.php.

SecurityComponent::$disabledFields = array()

Definition at line 142 of file security.php.

SecurityComponent::$loginOptions = array('type' => '', 'prompt' => null)

Definition at line 108 of file security.php.

SecurityComponent::$loginUsers = array()

Definition at line 117 of file security.php.

SecurityComponent::$requireAuth = array()

Definition at line 92 of file security.php.

SecurityComponent::$requireDelete = array()

Definition at line 76 of file security.php.

SecurityComponent::$requireGet = array()

Definition at line 60 of file security.php.

SecurityComponent::$requireLogin = array()

Definition at line 100 of file security.php.

SecurityComponent::$requirePost = array()

Definition at line 52 of file security.php.

SecurityComponent::$requirePut = array()

Definition at line 68 of file security.php.

SecurityComponent::$requireSecure = array()

Definition at line 84 of file security.php.


The documentation for this class was generated from the following file: