Quentin Gliech
144de0deb2
storage: freeze the error type on BoxRepository
...
This avoids having to deal with traits bounds everywhere. It also moves
the `boxed()` method to the PgRepository, because it was unnecessary to
keep it on the `Repository` trait
2024-07-26 11:36:55 +02:00
Quentin Gliech
d1b9a4980c
Update opentelemetry to 0.24.0
2024-07-25 11:01:43 +02:00
Quentin Gliech
62c2af5e6a
storage: add a filter by last active time on OAuth 2.0 sessions
2024-07-19 13:40:27 +02:00
Quentin Gliech
12d2f1f827
Add new filters on the OAuth and compat sessions
2024-07-16 18:23:23 +02:00
Quentin Gliech
7c54c5f2e6
Use dynamic filters on OAuth 2.0 sessions
2024-07-16 18:23:23 +02:00
Quentin Gliech
04b96b87b8
Batch finish OAuth 2.0 sessions
2024-07-16 14:13:11 +02:00
Quentin Gliech
dde907758e
Use OTEL semantic conventions constants for most attributes
2024-03-19 17:15:14 +01:00
Quentin Gliech
7e30daf83e
Replace parse-display with manual Display/FromStr impls
2024-03-19 16:38:46 +01:00
Quentin Gliech
61a69f5af4
Upgrade chrono and replace deprecated methods usage
2024-03-18 17:26:40 +01:00
Quentin Gliech
f3cbd3b315
Parse User Agents on the backend side ( #2388 )
...
* Parse user agents on the server side
* Parse and expose user agents on the backend
* Use the parsed user agent in the device consent page
* Fix the device icon tests
* Fix clippy warnings
* Box stuff to avoid large enum variants
* Ignore a clippy warning
* Fix the requester boxing
2024-02-23 16:47:48 +01:00
Quentin Gliech
f171d76dc5
Record user agents on OAuth 2.0 and compat sessions ( #2386 )
...
* Record user agents on OAuth 2.0 and compat sessions
* Add tests for recording user agent in sessions
2024-02-22 10:01:32 +01:00
Quentin Gliech
17e968f7cc
Record the user agent and IP in the device code grant
2024-02-02 18:01:51 +01:00
Quentin Gliech
b0042eb0c3
Clippy thinks I have too many bools in my structs
2024-02-02 18:01:51 +01:00
Quentin Gliech
31936bcc00
Save whether the client supports the device code grant in the database
2024-02-02 18:01:51 +01:00
Quentin Gliech
50654d2e40
Implement the device code authorisation request
2024-02-02 18:01:51 +01:00
Quentin Gliech
286fc57103
Add a repository for device code grants
2024-02-02 18:01:51 +01:00
Quentin Gliech
50558a7319
Make the last activity timestamp and IP available through the API
2023-09-19 21:57:54 +02:00
Quentin Gliech
b85655b944
Save the session activity in the database
2023-09-19 21:57:54 +02:00
Quentin Gliech
9c97a0c37a
storage: make the access token expiration optional
2023-09-11 12:03:42 +02:00
Quentin Gliech
e6b91c1ce4
data-model: make the access token expiration optional
2023-09-11 12:03:42 +02:00
Quentin Gliech
83ca90ee3d
Add a GraphQL mutation to create arbitrary OAuth2 sessions.
2023-09-11 12:03:42 +02:00
Quentin Gliech
542d0a6073
Implement the client credentials grant
2023-09-06 09:35:34 +02:00
Quentin Gliech
00fe5f902b
storage: add a method to create an OAuth 2.0 session for a client credentials grant
2023-09-06 09:35:34 +02:00
Quentin Gliech
7a9197f222
storage-pg: make the user_id in oauth2_sessions nullable
2023-09-06 09:35:34 +02:00
Quentin Gliech
7e247830c9
data-model: Make the user_id optional in the OAuth 2.0 sessions
2023-09-06 09:35:34 +02:00
Quentin Gliech
5d3b8cd92f
Store the browser user-agent when starting a browser session
2023-08-29 17:38:01 +02:00
Quentin Gliech
d7abdccc0a
storage: Allow filtering oauth2 sessions by scope
2023-08-29 16:53:38 +02:00
Quentin Gliech
438a10332a
Add the user_id directly on oauth2_sessions and make the scope a text list
2023-08-29 12:52:24 +02:00
Quentin Gliech
096386e9b9
Save the application_type and the contacts in the OAuth 2.0 clients
...
This also removes the dedicated "redirect_uris" table and makes it a field of the "oauth2_clients" table
2023-08-28 14:41:49 +02:00
Quentin Gliech
e79da4a949
Bump Rust dependencies and remove unused ones
2023-07-27 17:23:08 +02:00
Quentin Gliech
bbc50edb60
Better upstream OAuth links pagination and filtering
2023-07-21 19:50:30 +02:00
Quentin Gliech
6767c93a75
Better OAuth 2.0 sessions pagination and filtering
2023-07-21 19:50:30 +02:00
Quentin Gliech
b60121346f
mas-storage-pg: use fetch_optional instead of fetch_one and matching on the error
2023-07-21 19:50:30 +02:00
Quentin Gliech
dec9310a32
Sync the OAuth2 clients with CLI and remove redundant CLI tools
2023-06-26 17:24:56 +02:00
Quentin Gliech
17471c651e
handlers: add tests for the token endpoint
...
This also simplifies the way we issue tokens in tests
2023-02-22 19:38:01 +01:00
Quentin Gliech
0bf1a1998e
storage-pg: add tests for most remaining repositories
...
Also fixes all the list_paginated() repository methods
2023-01-26 15:51:53 +01:00
Quentin Gliech
3f4ad789bf
storage-pg: write tests for the OAuth2 repositories
2023-01-25 17:24:34 +01:00
Quentin Gliech
90dbc5d6ff
storage: document all the repository traits and methods
2023-01-25 16:09:36 +01:00
Quentin Gliech
9005931e2a
handlers: box the rng and clock, and extract it from the state
2023-01-18 17:49:59 +01:00
Quentin Gliech
8c585b20f0
Fix rustfmt
2023-01-18 12:27:44 +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