mirror of
https://github.com/elyby/accounts.git
synced 2024-12-25 22:59:53 +05:30
Исправлена проверка авторизации для запроса на refresh-token
This commit is contained in:
parent
f2e6df4022
commit
6d4bef0549
@ -110,7 +110,7 @@ class Component extends YiiUserComponent {
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function renew(AccountSession $session) {
|
||||
public function renew(AccountSession $session): RenewResult {
|
||||
$account = $session->account;
|
||||
$transaction = Yii::$app->db->beginTransaction();
|
||||
try {
|
||||
|
@ -17,13 +17,14 @@ class AuthenticationController extends Controller {
|
||||
public function behaviors() {
|
||||
return ArrayHelper::merge(parent::behaviors(), [
|
||||
'authenticator' => [
|
||||
'except' => ['login', 'forgot-password', 'recover-password', 'refresh-token'],
|
||||
'only' => ['logout'],
|
||||
],
|
||||
'access' => [
|
||||
'class' => AccessControl::class,
|
||||
'except' => ['refresh-token'],
|
||||
'rules' => [
|
||||
[
|
||||
'actions' => ['login', 'forgot-password', 'recover-password', 'refresh-token'],
|
||||
'actions' => ['login', 'forgot-password', 'recover-password'],
|
||||
'allow' => true,
|
||||
'roles' => ['?'],
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user