Commit Graph
27 Commits
Author SHA1 Message Date
Quentin Gliech 4227341857 Make the task State::clock() return a &dyn Clock instead of a BoxClock 2025-07-09 17:20:03 +02:00
Quentin Gliech 3d96dc9d47 Update license headers to match the actual license 2025-06-12 10:32:16 +02:00
Quentin Gliech 76adf18b2e tasks: don't rely on #[instrument(err)] for logging errors 2025-04-18 09:59:31 +02:00
Quentin Gliech 8581ca19ef Prune stale policy data once a day 2025-03-13 13:40:59 +01:00
Quentin Gliech 3d2b67a0b2 Upgrade to Rust 1.85 and edition 2024 2025-02-21 16:15:02 +01:00
Quentin Gliech 0360427adf Cleanup revoked tokens instead of expired ones
If we continue deleting expired tokens, we might not record whether the
token was used or not, and not know what to do in case of
a double-refresh.

Revoked tokens are safe to delete.

This also reduces the frequency of the cleanup job to once an hour.
2024-12-11 14:15:01 +01:00
Quentin Gliech 186860b10f Cron-like recurring jobs 2024-12-06 16:24:26 +01:00
Quentin Gliech ed4b6c42a7 Remove (C) 2024-09-10 14:28:55 +02:00
Quentin Gliech f6bb100c0a License headers change 2024-09-05 13:25:42 +02:00
Quentin Gliech 646b6cc0e3 Properly trace the cleanup-expired-tokens job 2023-08-03 14:06:34 +02:00
Quentin Gliech 64b3ed8ee0 Remove explicit generics from tasks layers
This defines an IdentityLayer<R> which is used to bind the request type
on the service, which helps with type inference.
2023-05-25 18:57:47 +02:00
Quentin Gliech 1993f4cfca Bump Rust dependencies 2023-05-25 18:15:44 +02:00
Quentin Gliech 08f58db08b Replace the OTEL-based tracing layer with tracing based layers 2023-04-18 14:45:43 +02:00
Quentin Gliech 2c937bda26 Lint 2023-04-14 10:22:22 +02:00
Quentin Gliech 5b4fee15e7 Upgrade to apalis-0.4.0-alpha.5 2023-04-14 10:22:22 +02:00
Quentin Gliech 169d7ce6a2 Extract the job tracing span logic to a layer 2023-04-14 10:22:22 +02:00
Quentin Gliech cdd535ddc4 WIP: use apalis to schedule jobs 2023-04-14 10:22:22 +02:00
Quentin Gliech c5e1e2ec62 Commit the DB transaction at the end of the cleanup task 2023-03-03 17:21:39 +01:00
Quentin Gliech d14ca156ad storage: split the repository trait 2023-01-24 16:05:14 +01:00
Quentin Gliech f4c64c2171 storage: ensure the repository trait can be boxed
and define some wrappers to map the errors
2023-01-19 19:10:35 +01:00
Quentin Gliech 142fdbd45a storage: make the Clock a trait 2023-01-18 12:20:30 +01:00
Quentin Gliech 73a921cc30 Split the storage trait from the implementation 2023-01-18 10:38:22 +01:00
Quentin Gliech 195203823a storage: wrap the postgres repository in a struct 2023-01-13 18:03:37 +01:00
Quentin Gliech 488a666a8d storage: remaining oauth2 repositories
- authorization grants
 - access tokens
 - refresh tokens
2023-01-12 18:26:04 +01:00
Quentin Gliech 559181c2c3 Pass the rng and clock around 2022-11-02 18:59:00 +01:00
Quentin Gliech a45381828c Loads of docs & enabling more clippy lints 2022-02-01 12:02:32 +01:00
Quentin Gliech 2f97ca685d Split the core crate 2021-12-17 18:04:30 +01:00