PHP 클래스 Kohana_Auth, php-framework-benchmarks

저자: Kohana Team
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_config
$_instance Auth instances
$_session

공개 메소드들

메소드 설명
__construct ( $config = [] ) : void Loads Session and configuration options.
check_password ( $password )
factory ( $config = [] ) : Auth Create an instance of Auth.
find_salt ( $password ) : string Finds the salt from a password, based on the configured salt pattern.
get_user ( ) : mixed Gets the currently logged in user from the session.
hash ( $str ) : string Perform a hash, using the configured method.
hash_password ( $password, $salt = FALSE ) : string Creates a hashed password from a plaintext password, inserting salt based on the configured salt pattern.
instance ( ) : Auth Singleton pattern
logged_in ( $role = NULL ) : mixed Check if there is an active session. Optionally allows checking for a specific role.
login ( $username, $password, $remember = FALSE ) : boolean Attempt to log in a user by using an ORM object and plain-text password.
logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean Log out a user by removing the related session variables.
password ( $username )

보호된 메소드들

메소드 설명
_login ( $username, $password, $remember )
complete_login ( $user )

메소드 상세

__construct() 공개 메소드

Loads Session and configuration options.
public __construct ( $config = [] ) : void
리턴 void

_login() 추상적인 보호된 메소드

abstract protected _login ( $username, $password, $remember )

check_password() 추상적인 공개 메소드

abstract public check_password ( $password )

complete_login() 보호된 메소드

protected complete_login ( $user )

factory() 공개 정적인 메소드

Create an instance of Auth.
public static factory ( $config = [] ) : Auth
리턴 Auth

find_salt() 공개 메소드

Finds the salt from a password, based on the configured salt pattern.
public find_salt ( $password ) : string
리턴 string

get_user() 공개 메소드

Returns FALSE if no user is currently logged in.
public get_user ( ) : mixed
리턴 mixed

hash() 공개 메소드

Perform a hash, using the configured method.
public hash ( $str ) : string
리턴 string

hash_password() 공개 메소드

Creates a hashed password from a plaintext password, inserting salt based on the configured salt pattern.
public hash_password ( $password, $salt = FALSE ) : string
리턴 string hashed password string

instance() 공개 정적인 메소드

Singleton pattern
public static instance ( ) : Auth
리턴 Auth

logged_in() 공개 메소드

Check if there is an active session. Optionally allows checking for a specific role.
public logged_in ( $role = NULL ) : mixed
리턴 mixed

login() 공개 메소드

Attempt to log in a user by using an ORM object and plain-text password.
public login ( $username, $password, $remember = FALSE ) : boolean
리턴 boolean

logout() 공개 메소드

Log out a user by removing the related session variables.
public logout ( $destroy = FALSE, $logout_all = FALSE ) : boolean
리턴 boolean

password() 추상적인 공개 메소드

abstract public password ( $username )

프로퍼티 상세

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

protected $_config

$_instance 보호되어 있는 정적으로 프로퍼티

Auth instances
protected static $_instance

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

protected $_session