Files
grafana/pkg/services/sqlstore/migrations
Eric Leijonmarck 9e22607231 [v10.1.x] Auth: Refactor for revoking user tokens within last hours (#74820)
Auth: Refactor for revoking user tokens within last hours (#74616)

* fix: revoked tokens within last hours

adds check for unlimited sessions out of index
adds a function for specifing the hours to look back when revoking users tokens, otherwise we "assume" the clean up takes care of them adds a index for the `user_auth_token` - `revoked_at` for faster queries when using `revoked_at`

* fix: sqllite datetime conversion with unixtimestamps

* fix: postgres dialect

* fix: mysql dialect

* fix: mysql dialect missing closing )

* refactor: delete revoked tokens directly

* fix: tests for sqlite

* AuthToken: Simplify DeleteUserRevokedTokens and add test

* fix: linting newline

* Reset get time after test

* fix: test order by revoked

* fix: order by different db

* ascending

* test with seen at

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit b00f3216c1)
2023-09-13 13:22:01 +01:00
..
2019-03-11 10:49:55 +01:00
2022-07-18 15:14:58 +02:00
2018-02-16 17:36:28 +01:00
2020-09-22 16:22:19 +02:00
2023-05-09 13:03:28 -04:00