| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class AuthAction extends \yii\authclient\AuthAction |
||
| 20 | { |
||
| 21 | private LoggerInterface $log; |
||
|
|
|||
| 22 | |||
| 23 | public function __construct($id, $controller, LoggerInterface $log, $config = []) |
||
| 24 | { |
||
| 25 | parent::__construct($id, $controller, $config); |
||
| 26 | $this->log = $log; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function run() |
||
| 30 | { |
||
| 31 | try { |
||
| 32 | return parent::run(); |
||
| 33 | } catch (Exception $e) { |
||
| 34 | if ($e->getMessage() !== 'Invalid auth state parameter.') { |
||
| 35 | Yii::$app->getResponse()->setStatusCode(500); |
||
| 36 | return Html::encode($e->getMessage()); |
||
| 59 |