PHP 클래스 yii\filters\auth\AuthMethod

부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\base\ActionFilter, implements yii\filters\auth\AuthInterface
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$optional list of action IDs that this filter will be applied to, but auth failure will not lead to error. It may be used for actions, that are allowed for public, but return some additional data for authenticated users. Defaults to empty, meaning authentication is not optional for any action. Since version 2.0.10 action IDs can be specified as wildcards, e.g. site/*.
$request the current request. If not set, the request application component will be used.
$response the response to be sent. If not set, the response application component will be used.
$user the user object representing the user authentication status. If not set, the user application component will be used.

공개 메소드들

메소드 설명
beforeAction ( $action )
challenge ( $response )
handleFailure ( $response )

보호된 메소드들

메소드 설명
isOptional ( Action $action ) : boolean Checks, whether authentication is optional for the given action.

메소드 상세

beforeAction() 공개 메소드

public beforeAction ( $action )

challenge() 공개 메소드

public challenge ( $response )

handleFailure() 공개 메소드

public handleFailure ( $response )

isOptional() 보호된 메소드

Checks, whether authentication is optional for the given action.
또한 보기: optional
부터: 2.0.7
protected isOptional ( Action $action ) : boolean
$action yii\base\Action action to be checked.
리턴 boolean whether authentication is optional or not.

프로퍼티 상세

$optional 공개적으로 프로퍼티

list of action IDs that this filter will be applied to, but auth failure will not lead to error. It may be used for actions, that are allowed for public, but return some additional data for authenticated users. Defaults to empty, meaning authentication is not optional for any action. Since version 2.0.10 action IDs can be specified as wildcards, e.g. site/*.
또한 보기: isOptional()
부터: 2.0.7
public $optional

$request 공개적으로 프로퍼티

the current request. If not set, the request application component will be used.
public $request

$response 공개적으로 프로퍼티

the response to be sent. If not set, the response application component will be used.
public $response

$user 공개적으로 프로퍼티

the user object representing the user authentication status. If not set, the user application component will be used.
public $user