Closed cstabor closed 4 years ago
client_credential type, no user_id exists? but authenticate used need it like this:
yii\filters\auth\AuthMethod.php
public function beforeAction($action) { $response = $this->response ? : Yii::$app->getResponse(); try { $identity = $this->authenticate( $this->user ? : Yii::$app->getUser(), $this->request ? : Yii::$app->getRequest(), $response ); } catch (UnauthorizedHttpException $e) { if ($this->isOptional($action)) { return true; } throw $e; } if ($identity !== null || $this->isOptional($action)) { return true; } else { $this->challenge($response); $this->handleFailure($response); return false; } }
here
$identity = $this->authenticate( $this->user ? : Yii::$app->getUser(), $this->request ? : Yii::$app->getRequest(), $response );
@sno0p1 thanks, I'd get it
client_credential type, no user_id exists? but authenticate used need it like this:
yii\filters\auth\AuthMethod.php
here