Реорганизована выдача JWT токенов

Добавлен механизм сохранения сессий и refresh_token
This commit is contained in:
ErickSkrauch
2016-05-30 02:44:17 +03:00
parent 98c01625d1
commit bdc96d82c1
34 changed files with 676 additions and 73 deletions

View File

@ -79,17 +79,16 @@ class SignupController extends Controller {
public function actionConfirm() {
$model = new ConfirmEmailForm();
$model->load(Yii::$app->request->post());
if (!($jwt = $model->confirm())) {
if (!($result = $model->confirm())) {
return [
'success' => false,
'errors' => $this->normalizeModelErrors($model->getErrors()),
];
}
return [
return array_merge([
'success' => true,
'jwt' => $jwt,
];
], $result->getAsResponse());
}
}