PHP 클래스 Backend\Core\Engine\Authentication

..
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
checkPassword ( string $password ) : string Check the strength of the password
cleanupOldSessions ( ) Cleanup sessions for the current user and sessions that are invalid
getAllowedActions ( ) : array
getEncryptedPassword ( string $email, string $password ) : string Returns the encrypted password for a user by giving a email/password Returns false if no user was found for this user/pass combination
getEncryptedString ( string $string, string $salt = null ) : string Returns a string encrypted like sha1(md5($salt) . md5($string)) The salt is an optional extra string you can strengthen your encryption with
getUser ( ) : User Returns the current authenticated user
isAllowedAction ( string $action = null, string $module = null ) : boolean Is the given action allowed for the current user
isAllowedModule ( string $module ) : boolean Is the given module allowed for the current user
isLoggedIn ( ) : boolean Is the current user logged in?
loginUser ( string $login, string $password ) : boolean Login the user with the given credentials.
logout ( ) Logout the current user
tearDown ( ) Reset our class to make sure no contamination from previous authentications persists. This signifies a deeper issue with this class. Solving the issue would be preferable to introducting another method. This currently only exists to serve the test.

비공개 메소드들

메소드 설명
getAlwaysAllowed ( ) : array

메소드 상세

checkPassword() 공개 정적인 메소드

Check the strength of the password
public static checkPassword ( string $password ) : string
$password string The password.
리턴 string

cleanupOldSessions() 공개 정적인 메소드

Cleanup sessions for the current user and sessions that are invalid
public static cleanupOldSessions ( )

getAllowedActions() 공개 정적인 메소드

public static getAllowedActions ( ) : array
리턴 array

getEncryptedPassword() 공개 정적인 메소드

Returns the encrypted password for a user by giving a email/password Returns false if no user was found for this user/pass combination
public static getEncryptedPassword ( string $email, string $password ) : string
$email string The email.
$password string The password.
리턴 string

getEncryptedString() 공개 정적인 메소드

Returns a string encrypted like sha1(md5($salt) . md5($string)) The salt is an optional extra string you can strengthen your encryption with
public static getEncryptedString ( string $string, string $salt = null ) : string
$string string The string to encrypt.
$salt string The salt to use.
리턴 string

getUser() 공개 정적인 메소드

Returns the current authenticated user
public static getUser ( ) : User
리턴 User

isAllowedAction() 공개 정적인 메소드

Is the given action allowed for the current user
public static isAllowedAction ( string $action = null, string $module = null ) : boolean
$action string The action to check for.
$module string The module wherein the action is located.
리턴 boolean

isAllowedModule() 공개 정적인 메소드

Is the given module allowed for the current user
public static isAllowedModule ( string $module ) : boolean
$module string The module to check for.
리턴 boolean

isLoggedIn() 공개 정적인 메소드

Is the current user logged in?
public static isLoggedIn ( ) : boolean
리턴 boolean

loginUser() 공개 정적인 메소드

Will return a boolean that indicates if the user is logged in.
public static loginUser ( string $login, string $password ) : boolean
$login string The users login.
$password string The password provided by the user.
리턴 boolean

logout() 공개 정적인 메소드

Logout the current user
public static logout ( )

tearDown() 공개 정적인 메소드

Reset our class to make sure no contamination from previous authentications persists. This signifies a deeper issue with this class. Solving the issue would be preferable to introducting another method. This currently only exists to serve the test.
public static tearDown ( )