PHP 클래스 AuthComponent, miniPHP

Authenticate & Authorize the current user.
저자: Omar El Gabry ([email protected])
상속: extends Component
파일 보기 프로젝트 열기: omarelgabry/miniphp 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config array Default configurations

공개 메소드들

메소드 설명
authenticate ( ) : boolean authenticate the user using the defined methods in $config
authorize ( ) : boolean authorize the user using the defined methods in $config
isLoggedIn ( ) : boolean Is user is already logged in via session or cookie?
startup ( ) Auth startup All authentication and authorization checking are done in this method
unauthenticated ( ) Handles unauthenticated access attempt.
unauthorized ( ) Handles unauthorized access attempt.

비공개 메소드들

메소드 설명
_ControllerAuthorize ( array $config ) : boolean Is user authorized for the requested Controller & Action method?
_UserAuthenticate ( array $config ) : boolean Is user authenticated? It checks for: - concurrent session - user credentials in session & cookies - cookies theft and manipulations - session Hijacking and fixation.
check ( array $config, string $type ) : boolean check for authentication or authorization
concurentSession ( )
loggedIn ( ) : boolean Checks if user is logged in or not.

메소드 상세

authenticate() 공개 메소드

authenticate the user using the defined methods in $config
public authenticate ( ) : boolean
리턴 boolean

authorize() 공개 메소드

authorize the user using the defined methods in $config
public authorize ( ) : boolean
리턴 boolean

isLoggedIn() 공개 메소드

Is user is already logged in via session or cookie?
public isLoggedIn ( ) : boolean
리턴 boolean

startup() 공개 메소드

Auth startup All authentication and authorization checking are done in this method
public startup ( )

unauthenticated() 공개 메소드

Handles unauthenticated access attempt.
public unauthenticated ( )

unauthorized() 공개 메소드

Handles unauthorized access attempt.
public unauthorized ( )

프로퍼티 상세

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

Default configurations
protected array $config
리턴 array