mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-18 23:43:19 +08:00
@@ -46,7 +46,7 @@ class HttpBearerAuth extends Component implements AuthInterface
|
|||||||
*/
|
*/
|
||||||
public function handleFailure($response)
|
public function handleFailure($response)
|
||||||
{
|
{
|
||||||
$response->getHeaders()->set('WWW-Authenticate', "Basic realm=\"{$this->realm}\"");
|
$response->getHeaders()->set('WWW-Authenticate', "Bearer realm=\"{$this->realm}\"");
|
||||||
throw new UnauthorizedHttpException('You are requesting with an invalid access token.');
|
throw new UnauthorizedHttpException('You are requesting with an invalid access token.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user