Реализована логика oAuth авторизации приложений, добавлен Redis, удалены лишние тесты, пофикшены старые.

This commit is contained in:
ErickSkrauch
2016-02-14 20:50:10 +03:00
parent 59addfac07
commit f5f93ddef1
52 changed files with 1752 additions and 317 deletions

View File

@@ -2,12 +2,14 @@
namespace api\controllers;
use api\traits\ApiNormalize;
use Yii;
/**
* @property \common\models\Account|null $account
*/
class Controller extends \yii\rest\Controller {
use ApiNormalize;
public $enableCsrfValidation = true;
public function behaviors() {
$parentBehaviors = parent::behaviors();
// xml нам не понадобится
@@ -16,4 +18,11 @@ class Controller extends \yii\rest\Controller {
return $parentBehaviors;
}
/**
* @return \common\models\Account|null
*/
public function getAccount() {
return Yii::$app->getUser()->getIdentity();
}
}