pclib  2.3.2
Lightweight PHP framework
Public Member Functions
AuthHttp Class Reference

Http authentication. More...

Inheritance diagram for AuthHttp:
Auth AuthBase BaseObject

Public Member Functions

 loginHttp ()
 Show http-login dialog, or verify client credentials.
 
- Public Member Functions inherited from Auth
 setLoggedUser (pclib\AuthUser $user)
 Take $user and log him in. More...
 
 getUser ($userName=null)
 Without parameter it returns logged user, user $userName otherwise. More...
 
 exists ($userName)
 Check if user $userName exists. More...
 
 getStorage ()
 Return storage object - if not exists, create one. More...
 
 login ($userName, $password)
 Authenticate user $userName with password $password. More...
 
 logout ()
 Logout active user.
 
 testRight ($name, $objectId=0)
 Check if logged user has permission $name. More...
 
 isLogged ()
 Check if someone is logged in.
 
 hasRight ($name, $objectId=0)
 Check if logged user has permission $name. More...
 
 hasRole ($role)
 Check if logged user has role $role. More...
 
- Public Member Functions inherited from AuthBase
 __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...
 

Additional Inherited Members

- Static Public Member Functions inherited from BaseObject
static defaults ()
 Set or retireve default parameters of the object. More...
 
- Data Fields inherited from Auth
 $storage
 var AuthDbStorage
 
 $realm
 Apps with the same realm share authentization session. More...
 
 $verifyRemote = true
 Check if remote address changed. More...
 
 $loggedUser
 var AuthUser User which is logged in. More...
 
 $onAfterLogin
 Occurs after login. More...
 
 $onBeforeLogout
 Occurs before logout. More...
 
- Data Fields inherited from AuthBase
 $translator
 var Translator
 
 $errors = array()
 Array of error messages (if any)
 
 $secret
 Secret string used for enpowerment of md5 hash.
 
 $passwordAlgo
 Password algorhitm - can be 'md5' or 'bcrypt'.
 
 $passwordCost = 10
 Bcrypt cost. More...
 
 $throwsExceptions = false
 Throws exceptions instead of just collecting errors in ->errors.
 
 $onError
 Occurs on auth error. More...
 
- Data Fields inherited from BaseObject
 $onNewInstance
 Occurs when new instance of the class is created. More...
 
 $onMissingMethod
 Occurs when called method does not exist. More...
 
 $serviceLocator
 var function() Return service object when requested with service(). More...
 
- Protected Member Functions inherited from Auth
 getUserIp (pclib\AuthUser $user)
 Get user ip-address, check if changed and log notice if so.
 
 getSessionUser ()
 Load user from session storage, check session validity. More...
 
 setSessionUser (pclib\AuthUser $user=null)
 Store user to session. More...
 
- Protected Member Functions inherited from AuthBase
 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 inherited from AuthBase
 $app
 var App
 

Detailed Description

Http authentication.

Usage: Call $auth->loginHttp(); before any protected page of the web.


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