PHP Trait CakeDC\Users\Controller\Traits\LoginTrait

Inheritance: use trait CustomUsersTableTrait
Show file Open project: CakeDC/users

Public Methods

Method Description
failedSocialLogin ( mixed $exception, mixed $data, boolean | false $flash = false ) : mixed
failedSocialLoginListener ( Cake\Event\Event $event ) : void
login ( ) : mixed Login user
logout ( ) : type Logout
socialLogin ( ) : array Social login
twitterLogin ( ) : mixed | void Do twitter login
verify ( ) : void Verify for Google Authenticator If Google Authenticator's enabled we need to verify authenticated user. To avoid accidental access to other URL's we store auth'ed used into temporary session to perform code verification.

Protected Methods

Method Description
_afterIdentifyUser ( array $user, boolean $socialLogin = false, $googleAuthenticatorLogin = false ) : array Update remember me and determine redirect url after user identified
_checkReCaptcha ( ) : boolean Check reCaptcha if enabled for login
_isGoogleAuthenticator ( ) : boolean Check if we doing Google Authenticator Two Factor auth
_isSocialLogin ( ) : boolean Check if we are doing a social login

Method Details

_afterIdentifyUser() protected method

Update remember me and determine redirect url after user identified
protected _afterIdentifyUser ( array $user, boolean $socialLogin = false, $googleAuthenticatorLogin = false ) : array
$user array user data after identified
$socialLogin boolean is social login
return array

_checkReCaptcha() protected method

Check reCaptcha if enabled for login
protected _checkReCaptcha ( ) : boolean
return boolean

_isGoogleAuthenticator() protected method

Check if we doing Google Authenticator Two Factor auth
protected _isGoogleAuthenticator ( ) : boolean
return boolean true if Google Authenticator is enabled

_isSocialLogin() protected method

Check if we are doing a social login
protected _isSocialLogin ( ) : boolean
return boolean true if social login is enabled and we are processing the social login data in the request

failedSocialLogin() public method

public failedSocialLogin ( mixed $exception, mixed $data, boolean | false $flash = false ) : mixed
$exception mixed exception
$data mixed data
$flash boolean | false flash
return mixed

failedSocialLoginListener() public method

public failedSocialLoginListener ( Cake\Event\Event $event ) : void
$event Cake\Event\Event event
return void

login() public method

Login user
public login ( ) : mixed
return mixed

logout() public method

Logout
public logout ( ) : type
return type

socialLogin() public method

Social login
public socialLogin ( ) : array
return array

twitterLogin() public method

Do twitter login
public twitterLogin ( ) : mixed | void
return mixed | void

verify() public method

Verify for Google Authenticator If Google Authenticator's enabled we need to verify authenticated user. To avoid accidental access to other URL's we store auth'ed used into temporary session to perform code verification.
public verify ( ) : void
return void