filters\auth\HttpBearerAuth $realm

$realm public property The HTTP authentication realm public string $realm = 'api'

filters\auth\HttpBasicAuth challenge()

challenge() public method Generates challenges upon authentication failure. For example, some appropriate HTTP headers may be generated. public void challenge ( $response )$response yii\web\Response

filters\auth\HttpBasicAuth authenticate()

authenticate() public method Authenticates the current user. public yii\web\IdentityInterface authenticate ( $user, $request, $response )$user yii\web\User $request yii\web\Request $response yii\web\Response return yii\web\IdentityInterface The authenticated user identity. If authentication information is not provided, null will be returned. throws yii\web\UnauthorizedHttpException if authentication information is provided but is invalid.

filters\auth\HttpBasicAuth $realm

$realm public property The HTTP authentication realm public string $realm = 'api'

filters\auth\HttpBasicAuth $auth

$auth public property A PHP callable that will authenticate the user with the HTTP basic auth information. The callable receives a username and a password as its parameters. It should return an identity object that matches the username and password. Null should be returned if there is no such identity. The following code is a typical implementation of this callable: function ($username, $password) { return \app\models\User::findOne([ 'username' => $username, 'password

filters\auth\CompositeAuth challenge()

challenge() public method Generates challenges upon authentication failure. For example, some appropriate HTTP headers may be generated. public void challenge ( $response )$response yii\web\Response

filters\auth\CompositeAuth beforeAction()

beforeAction() public method This method is invoked right before an action is to be executed (after all possible filters.) You may override this method to do last-minute preparation for the action. public boolean beforeAction ( $action )$action yii\base\Action The action to be executed. return boolean Whether the action should continue to be executed.

filters\auth\CompositeAuth authenticate()

authenticate() public method Authenticates the current user. public yii\web\IdentityInterface authenticate ( $user, $request, $response )$user yii\web\User $request yii\web\Request $response yii\web\Response return yii\web\IdentityInterface The authenticated user identity. If authentication information is not provided, null will be returned. throws yii\web\UnauthorizedHttpException if authentication information is provided but is invalid.

filters\auth\CompositeAuth $authMethods

$authMethods public property The supported authentication methods. This property should take a list of supported authentication methods, each represented by an authentication class or configuration. If this property is empty, no authentication will be performed. Note that an auth method class must implement the yii\filters\auth\AuthInterface interface. public array $authMethods = []

filters\auth\AuthMethod isOptional()

isOptional() protected method (available since version 2.0.7) Checks, whether authentication is optional for the given action. See also $optional. protected boolean isOptional ( $action )$action yii\base\Action Action to be checked. return boolean Whether authentication is optional or not.