Property | Type | Description | |
---|---|---|---|
$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. |
Method | Description | |
---|---|---|
beforeAction ( $action ) | ||
challenge ( $response ) | ||
handleFailure ( $response ) |
Method | Description | |
---|---|---|
isOptional ( |
Checks, whether authentication is optional for the given action. |
protected isOptional ( |
||
$action | action to be checked. | |
return | boolean | whether authentication is optional or not. |
public $optional |
public $request |
public $response |