PHP Class CakeDC\Users\Controller\Component\UsersAuthComponent

Inheritance: extends Cake\Controller\Component
Show file Open project: CakeDC/users

Public Methods

Method Description
initialize ( array $config ) : void Initialize method, setup Auth if not already done passing the $config provided and setup the default table to Users.Users if not provided
isUrlAuthorized ( Cake\Event\Event $event ) : boolean Check if a given url is authorized

Protected Methods

Method Description
_attachPermissionChecker ( ) : void Attach the isUrlAuthorized event to allow using the Auth authorize from the UserHelper
_initAuth ( ) : void Initialize the AuthComponent and configure allowed actions
_isActionAllowed ( array $requestParams = [] ) : boolean Check if the action is in allowedActions array for the controller
_loadGoogleAuthenticator ( ) : void Load GoogleAuthenticator object
_loadRememberMe ( ) : void Load RememberMe component and Auth objects
_loadSocialLogin ( ) : void Load Social Auth object
_validateConfig ( ) : void Validate if the passed configuration makes sense

Method Details

_attachPermissionChecker() protected method

Attach the isUrlAuthorized event to allow using the Auth authorize from the UserHelper
protected _attachPermissionChecker ( ) : void
return void

_initAuth() protected method

Initialize the AuthComponent and configure allowed actions
protected _initAuth ( ) : void
return void

_isActionAllowed() protected method

Check if the action is in allowedActions array for the controller
protected _isActionAllowed ( array $requestParams = [] ) : boolean
$requestParams array request parameters
return boolean

_loadGoogleAuthenticator() protected method

Load GoogleAuthenticator object
protected _loadGoogleAuthenticator ( ) : void
return void

_loadRememberMe() protected method

Load RememberMe component and Auth objects
protected _loadRememberMe ( ) : void
return void

_loadSocialLogin() protected method

Load Social Auth object
protected _loadSocialLogin ( ) : void
return void

_validateConfig() protected method

Validate if the passed configuration makes sense
protected _validateConfig ( ) : void
return void

initialize() public method

Initialize method, setup Auth if not already done passing the $config provided and setup the default table to Users.Users if not provided
public initialize ( array $config ) : void
$config array config options
return void

isUrlAuthorized() public method

Check if a given url is authorized
public isUrlAuthorized ( Cake\Event\Event $event ) : boolean
$event Cake\Event\Event event
return boolean