| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function actionRemoveExpired() |
||
| 16 | { |
||
| 17 | $tokenSuppressedNumber = 0; |
||
| 18 | $tokenSuppressedNumber += Yii::$app->db->createCommand() |
||
| 19 | ->delete('oauthAccessTokens', 'expiry <= NOW()') |
||
| 20 | ->execute(); |
||
| 21 | $tokenSuppressedNumber += Yii::$app->db->createCommand() |
||
| 22 | ->delete('oauthAuthorizationCodes', 'expiry <= NOW()') |
||
| 23 | ->execute(); |
||
| 24 | $tokenSuppressedNumber += Yii::$app->db->createCommand() |
||
| 25 | ->delete('oauthJtis', 'expires <= NOW()') |
||
| 26 | ->execute(); |
||
| 27 | $tokenSuppressedNumber += Yii::$app->db->createCommand() |
||
| 28 | ->delete('oauthRefreshTokens', 'expiry <= NOW()') |
||
| 29 | ->execute(); |
||
| 30 | $this->stdout($tokenSuppressedNumber."\n"); |
||
| 31 | return ExitCode::OK; |
||
| 32 | } |
||
| 33 | } |
||
| 34 |