PHP 트레잇 Airship\Engine\Bolt\Security

Common security features. Mostly access controls.
파일 보기 프로젝트 열기: paragonie/airship

공개 프로퍼티들

프로퍼티 타입 설명
$airship_auth Authentication
$airship_perms Permissions

공개 메소드들

메소드 설명
can ( string $action, string $context = '', string $cabin = '', integer $userID ) : boolean Perform a permissions check
completeLogOut ( ) : boolean Completely wipe all authentication mechanisms (Session, Cookie)
getActiveUserId ( ) : integer Get the current user ID. Throws a UserNotLoggedIn exception if you aren't logged in.
isLoggedIn ( ) : boolean Are we logged in to a user account?
isSuperUser ( integer $userId ) : boolean Are we currently logged in as an admin?
tightenSecurityBolt ( ) After loading the Security bolt in place, configure it.
verifySessionCanary ( integer $userID, boolean $logOut = true ) : boolean If another session triggered a password reset, we should be logged out as per the Bridge configuration. (This /is/ an optional feature.)

보호된 메소드들

메소드 설명
doAutoLogin ( string $token, string $uid_idx, string $token_idx ) : boolean Let's do an automatic login

메소드 상세

can() 공개 메소드

Perform a permissions check
public can ( string $action, string $context = '', string $cabin = '', integer $userID ) : boolean
$action string action label (e.g. 'read')
$context string context regex (in perm_contexts)
$cabin string (defaults to current cabin)
$userID integer (defaults to current user)
리턴 boolean

completeLogOut() 공개 메소드

Completely wipe all authentication mechanisms (Session, Cookie)
public completeLogOut ( ) : boolean
리턴 boolean

doAutoLogin() 보호된 메소드

Let's do an automatic login
protected doAutoLogin ( string $token, string $uid_idx, string $token_idx ) : boolean
$token string
$uid_idx string
$token_idx string
리턴 boolean

getActiveUserId() 공개 메소드

Get the current user ID. Throws a UserNotLoggedIn exception if you aren't logged in.
public getActiveUserId ( ) : integer
리턴 integer

isLoggedIn() 공개 메소드

Are we logged in to a user account?
public isLoggedIn ( ) : boolean
리턴 boolean

isSuperUser() 공개 메소드

Are we currently logged in as an admin?
public isSuperUser ( integer $userId ) : boolean
$userId integer (defaults to current user)
리턴 boolean

tightenSecurityBolt() 공개 메소드

After loading the Security bolt in place, configure it.
public tightenSecurityBolt ( )

verifySessionCanary() 공개 메소드

If another session triggered a password reset, we should be logged out as per the Bridge configuration. (This /is/ an optional feature.)
public verifySessionCanary ( integer $userID, boolean $logOut = true ) : boolean
$userID integer
$logOut boolean
리턴 boolean

프로퍼티 상세

$airship_auth 공개적으로 프로퍼티

public Authentication $airship_auth
리턴 Authentication

$airship_perms 공개적으로 프로퍼티

public Permissions $airship_perms
리턴 Permissions