PHP Class Bolt\AccessControl\Login

Author: Gawain Lynch ([email protected])
Inheritance: extends AccessChecker
Afficher le fichier Open project: bolt/bolt Class Usage Examples

Protected Properties

Свойство Type Description
$authTokenName string
$passwordFactory PasswordLib\Password\Factory

Méthodes publiques

Méthode Description
__construct ( Silex\Application $app ) Constructor.
login ( string $userName, string $password, Bolt\Events\AccessControlEvent $event ) : boolean Attempt to login a user with the given password. Accepts username or email.

Méthodes protégées

Méthode Description
getUserEntity ( string $userName ) : Bolt\Storage\Entity\Users | null Get the user record entity if it exists.
loginCheckAuthtoken ( string $authCookie, Bolt\Events\AccessControlEvent $event ) : boolean Attempt to login a user via the bolt_authtoken cookie.
loginCheckPassword ( string $userName, string $password, Bolt\Events\AccessControlEvent $event ) : boolean Check a user login request for username/password combinations.
loginFailed ( Bolt\Storage\Entity\Users $userEntity ) : false Add error messages to logs and update the user.
loginFinish ( Bolt\Storage\Entity\Users $userEntity ) : boolean Finish user login process(es).
updateAuthToken ( Bolt\Storage\Entity\Users $userEntity ) : Bolt\Storage\Entity\Authtoken Set the Authtoken cookie and DB-entry. If it's already present, update it.
updateUserLogin ( Bolt\Storage\Entity\Users $userEntity ) : boolean Update the user record with latest login information.
updateUserShadowLogin ( Bolt\Storage\Entity\Users $userEntity ) : Bolt\Storage\Entity\Users Remove expired shadow login data.

Private Methods

Méthode Description
throttleUntil ( integer $attempts ) : DateTime Calculate the amount of time until we should throttle login attempts for a user.

Method Details

__construct() public méthode

Constructor.
public __construct ( Silex\Application $app )
$app Silex\Application

getUserEntity() protected méthode

Get the user record entity if it exists.
protected getUserEntity ( string $userName ) : Bolt\Storage\Entity\Users | null
$userName string
Résultat Bolt\Storage\Entity\Users | null

login() public méthode

Attempt to login a user with the given password. Accepts username or email.
public login ( string $userName, string $password, Bolt\Events\AccessControlEvent $event ) : boolean
$userName string
$password string
$event Bolt\Events\AccessControlEvent
Résultat boolean

loginCheckAuthtoken() protected méthode

Attempt to login a user via the bolt_authtoken cookie.
protected loginCheckAuthtoken ( string $authCookie, Bolt\Events\AccessControlEvent $event ) : boolean
$authCookie string
$event Bolt\Events\AccessControlEvent
Résultat boolean

loginCheckPassword() protected méthode

Check a user login request for username/password combinations.
protected loginCheckPassword ( string $userName, string $password, Bolt\Events\AccessControlEvent $event ) : boolean
$userName string
$password string
$event Bolt\Events\AccessControlEvent
Résultat boolean

loginFailed() protected méthode

Add error messages to logs and update the user.
protected loginFailed ( Bolt\Storage\Entity\Users $userEntity ) : false
$userEntity Bolt\Storage\Entity\Users
Résultat false

loginFinish() protected méthode

Finish user login process(es).
protected loginFinish ( Bolt\Storage\Entity\Users $userEntity ) : boolean
$userEntity Bolt\Storage\Entity\Users
Résultat boolean

updateAuthToken() protected méthode

Set the Authtoken cookie and DB-entry. If it's already present, update it.
protected updateAuthToken ( Bolt\Storage\Entity\Users $userEntity ) : Bolt\Storage\Entity\Authtoken
$userEntity Bolt\Storage\Entity\Users
Résultat Bolt\Storage\Entity\Authtoken

updateUserLogin() protected méthode

Update the user record with latest login information.
protected updateUserLogin ( Bolt\Storage\Entity\Users $userEntity ) : boolean
$userEntity Bolt\Storage\Entity\Users
Résultat boolean

updateUserShadowLogin() protected méthode

Remove expired shadow login data.
protected updateUserShadowLogin ( Bolt\Storage\Entity\Users $userEntity ) : Bolt\Storage\Entity\Users
$userEntity Bolt\Storage\Entity\Users
Résultat Bolt\Storage\Entity\Users

Property Details

$authTokenName protected_oe property

protected string $authTokenName
Résultat string

$passwordFactory protected_oe property

protected Factory,PasswordLib\Password $passwordFactory
Résultat PasswordLib\Password\Factory