mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Translate all code comments from Russian to English [skip ci]
This commit is contained in:
@ -1,11 +1,13 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace api\controllers;
|
||||
|
||||
use Yii;
|
||||
use yii\filters\auth\HttpBearerAuth;
|
||||
|
||||
/**
|
||||
* Поведения:
|
||||
* Behaviors:
|
||||
* @mixin \yii\filters\ContentNegotiator
|
||||
* @mixin \yii\filters\VerbFilter
|
||||
* @mixin \yii\filters\auth\CompositeAuth
|
||||
@ -14,13 +16,13 @@ class Controller extends \yii\rest\Controller {
|
||||
|
||||
public function behaviors(): array {
|
||||
$parentBehaviors = parent::behaviors();
|
||||
// Добавляем авторизатор для входа по jwt токенам
|
||||
// Add JWT authenticator
|
||||
$parentBehaviors['authenticator'] = [
|
||||
'class' => HttpBearerAuth::class,
|
||||
'user' => Yii::$app->getUser(),
|
||||
];
|
||||
|
||||
// xml и rate limiter нам не понадобятся
|
||||
// XML and rate limiter is not necessary
|
||||
unset(
|
||||
$parentBehaviors['contentNegotiator']['formats']['application/xml'],
|
||||
$parentBehaviors['rateLimiter']
|
||||
|
Reference in New Issue
Block a user