PHP 클래스 Bolt\AccessControl\Login

저자: Gawain Lynch ([email protected])
상속: extends AccessChecker
파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$authTokenName string
$passwordFactory PasswordLib\Password\Factory

공개 메소드들

메소드 설명
__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.

보호된 메소드들

메소드 설명
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.

비공개 메소드들

메소드 설명
throttleUntil ( integer $attempts ) : DateTime Calculate the amount of time until we should throttle login attempts for a user.

메소드 상세

__construct() 공개 메소드

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

getUserEntity() 보호된 메소드

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

login() 공개 메소드

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
리턴 boolean

loginCheckAuthtoken() 보호된 메소드

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
리턴 boolean

loginCheckPassword() 보호된 메소드

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
리턴 boolean

loginFailed() 보호된 메소드

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

loginFinish() 보호된 메소드

Finish user login process(es).
protected loginFinish ( Bolt\Storage\Entity\Users $userEntity ) : boolean
$userEntity Bolt\Storage\Entity\Users
리턴 boolean

updateAuthToken() 보호된 메소드

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
리턴 Bolt\Storage\Entity\Authtoken

updateUserLogin() 보호된 메소드

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

updateUserShadowLogin() 보호된 메소드

Remove expired shadow login data.
protected updateUserShadowLogin ( Bolt\Storage\Entity\Users $userEntity ) : Bolt\Storage\Entity\Users
$userEntity Bolt\Storage\Entity\Users
리턴 Bolt\Storage\Entity\Users

프로퍼티 상세

$authTokenName 보호되어 있는 프로퍼티

protected string $authTokenName
리턴 string

$passwordFactory 보호되어 있는 프로퍼티

protected Factory,PasswordLib\Password $passwordFactory
리턴 PasswordLib\Password\Factory