This commit is contained in:
andrey
2022-03-03 17:24:45 +03:00
parent 4cbb004c4d
commit daee4e3e68
5 changed files with 15 additions and 15 deletions

View File

@ -8,18 +8,18 @@ use yii\filters\auth\HttpBearerAuth;
use yii\web\NotFoundHttpException;
use yii\rest\Controller;
class AnswerController extends Controller
class AnswerController extends ApiController
{
public function behaviors(): array
{
$behaviors = parent::behaviors();
$behaviors['authenticator']['authMethods'] = [
HttpBearerAuth::className(),
];
return $behaviors;
}
// public function behaviors(): array
// {
// $behaviors = parent::behaviors();
//
// $behaviors['authenticator']['authMethods'] = [
// HttpBearerAuth::className(),
// ];
//
// return $behaviors;
// }
public function verbs(): array
{