芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/vendor/yiisoft/yii2/filters/auth/HttpBearerAuth.php
[ * 'class' => \yii\filters\auth\HttpBearerAuth::class, * ], * ]; * } * ``` * * @author Qiang Xue
* @since 2.0 */ class HttpBearerAuth extends HttpHeaderAuth { /** * {@inheritdoc} */ public $header = 'Authorization'; /** * {@inheritdoc} */ public $pattern = '/^Bearer\s+(.*?)$/'; /** * @var string the HTTP authentication realm */ public $realm = 'api'; /** * {@inheritdoc} */ public function challenge($response) { $response->getHeaders()->set('WWW-Authenticate', "Bearer realm=\"{$this->realm}\""); } }