pclib  2.3.2
Lightweight PHP framework
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
AuthBase Class Reference

Base class for most classes of authorization system. More...

Inheritance diagram for AuthBase:
BaseObject Auth AuthConsole AuthManager AuthHttp

Public Member Functions

 __construct ()
 Constructor - load config parameters.
 passwordHash ($password)
 Return password hash. More...
 passwordHashVerify ($password, $hash)
 Verify password hash. More...
 setError ($message)
 Add error message into ->errors variable. More...
- Public Member Functions inherited from BaseObject
 loadDefaults ($className=null)
 Load default parameters of class $className into object instance.
 setProperties (array $defaults)
 Set public properties of object from the array. More...
 addEvent ($name, $callback)
 Add event handler to $object->$name property. More...
 toArray ()
 Convert object to array. More...

Data Fields

 var Translator
 $errors = array()
 Array of error messages (if any)
 Secret string used for enpowerment of md5 hash.
 Password algorhitm - can be 'md5' or 'bcrypt'.
 $passwordCost = 10
 Bcrypt cost. More...
 $throwsExceptions = false
 Throws exceptions instead of just collecting errors in ->errors.
 Occurs on auth error. More...
- Data Fields inherited from BaseObject
 Occurs when new instance of the class is created. More...
 Occurs when called method does not exist. More...
 var function() Return service object when requested with service(). More...

Protected Member Functions

 log ($category, $messageId, $message=null, $itemId=null)
 log security issue using App->logger. More...
- Protected Member Functions inherited from BaseObject
 fireEvent ($name, array $args=array())
 Run all event handlers in $object->$name property. More...
 service ($service, $default=null)
 Try acquire $service and load it into property $this->$service. More...

Protected Attributes

 var App

Additional Inherited Members

- Static Public Member Functions inherited from BaseObject
static defaults ()
 Set or retireve default parameters of the object. More...

Detailed Description

Base class for most classes of authorization system.

Member Function Documentation

log (   $category,
  $message = null,
  $itemId = null 

log security issue using App->logger.

passwordHash (   $password)

Return password hash.

string $hash
passwordHashVerify (   $password,

Verify password hash.

bool $valid
setError (   $message)

Add error message into ->errors variable.

string$messageMessage with s placeholders

Field Documentation


Occurs on auth error.

$passwordCost = 10

Bcrypt cost.

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