Base Authentication class with common methods and properties.
__construct( ComponentCollection $collection , array $settings )
Constructor
ComponentCollection $collection $settings _findUser( string|array $username , string $password null )
Find a user record using the standard options.
The $username parameter can be a (string)username or an array containing conditions for Model::find('first'). If the $password param is not provided the password field will be present in returned array.
Input passwords will be hashed even when a user doesn't exist. This helps mitigate timing attacks that are attempting to find valid usernames.
$username $password optional null boolean|array_password( string $password )
Hash the plain text password so that it matches the hashed/encrypted password in the datasource.
$password stringauthenticate( CakeRequest $request , CakeResponse $response )
Authenticate a user based on the request information.
CakeRequest $request CakeResponse $response mixedgetUser( CakeRequest $request )
Get a user based on information in the request. Primarily used by stateless authentication systems like basic and digest auth.
CakeRequest $request mixedimplementedEvents( )
Implemented events
arrayCakeEventListener::implementedEvents() logout( array $user )
Allows you to hook into AuthComponent::logout(), and implement specialized logout behavior.
All attached authentication objects will have this method called when a user logs out.
$user passwordHasher( )
Return password hasher object
AbstractPasswordHasherCakeExceptionunauthenticated( CakeRequest $request , CakeResponse $response )
Handle unauthenticated access attempt.
CakeRequest $request CakeResponse $response mixed
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
http://api.cakephp.org/2.7/class-BaseAuthenticate.html