227 Commits

Author SHA1 Message Date
reivilibre
c82f454365 Personal Sessions: add create, list, get, revoke, regenerate Admin APIs (#5141)
Introduces some admin API endpoints for Personal Sessions.

- add: Creates a personal session along with its first personal access token, returning both. This is currently the only way to get a personal access token.
- get: Shows the information about a personal session
- list: Shows many personal sessions
- revoke: Revokes a personal session, so it can't be used anymore
- regenerate: Revoke the active personal access token for a session and issue a new one to replace it.
2025-10-22 11:20:02 +01:00
Olivier 'reivilibre
8bc119fabd note: device_id only used for compat access & refresh tokens 2025-10-20 17:23:31 +01:00
Olivier 'reivilibre
fccd74a8f9 drive-by formatting fixes 2025-10-20 16:42:01 +01:00
Olivier 'reivilibre
19ce879489 drive-by clippy fixes 2025-10-20 16:42:01 +01:00
Leon Wilzer
cb83bee6d3 make token_endpoint_auth_signing_alg_values_supported optional
token_endpoint_auth_signing_alg_values_supported is an optional value
according to OIDC spec
2025-09-05 16:04:20 +02:00
Quentin Gliech
eded025ff4 Fix a few clippy lints, mostly in doc comments 2025-08-18 10:34:28 +02:00
Quentin Gliech
78933acb3c Collapse a few nested if now that we have if let chains 2025-08-18 10:29:30 +02:00
Quentin Gliech
4d83fcb25e Merge remote-tracking branch 'origin/main' into quenting/stable-api 2025-08-04 16:38:49 +02:00
Quentin Gliech
b8d23be313 Fix many clippy warnings
This is because the tracing-attributes update made clippy look at those
again. I've removed the `too_many_lines` lint, as it's not really useful
and we ignore it most of the time anyway.
2025-07-30 14:49:38 +02:00
Quentin Gliech
32f8d22dec Include the issuer URLs in the error message when they don't match 2025-07-23 19:36:54 +02:00
Quentin Gliech
c1d5b08b0e Make the introspection endpoint normalise stable and unstable scopes 2025-06-13 15:53:49 +02:00
Quentin Gliech
6421d9d1f5 Add license headers in most files that missed them 2025-06-12 11:01:07 +02:00
Quentin Gliech
52b0a9b2ba Update license headers to match the actual license 2025-06-12 10:32:16 +02:00
Quentin Gliech
69e3001966 Define all the dependencies at the workspace level 2025-06-10 14:25:38 +02:00
Quentin Gliech
6c94dc4874 Record metrics for OAuth 2.0 token requests 2025-03-26 23:14:51 +01:00
Quentin Gliech
ea2a74517a Sort client registration metadata fields before hashing 2025-03-26 15:41:04 +01:00
Quentin Gliech
5ae2970d94 Ensure client metadata hashing is stable
This is done by using the indexmap crate to preserve insertion order for
localized fields.
2025-03-25 15:00:48 +01:00
Quentin Gliech
8fbd75eb7e Deduplicate client registrations by hashing the metadata 2025-03-25 15:00:23 +01:00
Quentin Gliech
a932a6939c Replace data-encoding with base64ct 2025-03-25 13:41:58 +01:00
Olivier 'reivilibre
3c6f9815dc Use DurationSeconds 2025-03-17 10:29:54 +00:00
Olivier 'reivilibre
73d3703fda Add expires_in to introspection responses
Closes #4224

Corresponds to: https://github.com/element-hq/synapse/pull/18231
2025-03-17 09:41:29 +00:00
Quentin Gliech
44b6777f1b Merge remote-tracking branch 'origin/main' into quenting/compat-device-id 2025-03-04 13:33:09 +01:00
Quentin Gliech
56d9c7e63b Upgrade to Rust 1.85 and edition 2024 2025-02-21 16:15:02 +01:00
Quentin Gliech
a3f22ae5f6 Allow compat session devices to have spaces 2025-02-19 17:55:18 +01:00
dependabot[bot]
4cd144c4dc build(deps): bump data-encoding from 2.7.0 to 2.8.0
Bumps [data-encoding](https://github.com/ia0/data-encoding) from 2.7.0 to 2.8.0.
- [Commits](https://github.com/ia0/data-encoding/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: data-encoding
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-10 14:14:02 +00:00
dependabot[bot]
2e01d91907 build(deps): bump data-encoding from 2.6.0 to 2.7.0
Bumps [data-encoding](https://github.com/ia0/data-encoding) from 2.6.0 to 2.7.0.
- [Commits](https://github.com/ia0/data-encoding/commits)

---
updated-dependencies:
- dependency-name: data-encoding
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 15:37:49 +01:00
Quentin Gliech
5aa9535cb1 Remove unused dependencies 2025-01-16 17:59:03 +01:00
dependabot[bot]
41118e3e3d build(deps): bump serde_with from 3.11.0 to 3.12.0
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.11.0 to 3.12.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.11.0...v3.12.0)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-06 10:53:57 +01:00
Mathieu Velten
f832666a86 Add fetch_userinfo to upstream SSO provider (#3363) 2024-11-26 15:01:03 +00:00
Quentin Gliech
0fde63594a Remove most doctests 2024-10-29 12:37:59 +01:00
dependabot[bot]
fd62fb7c9d build(deps): bump serde_with from 3.9.0 to 3.11.0
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.9.0 to 3.11.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.9.0...v3.11.0)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-07 18:49:33 +02:00
Quentin Gliech
9e1cd0cdec Move the remaining mentions of matrix-org to element-hq 2024-09-10 14:28:55 +02:00
Quentin Gliech
9a946c19e7 Remove (C) 2024-09-10 14:28:55 +02:00
Quentin Gliech
9da19e2af0 License headers change 2024-09-05 13:25:42 +02:00
dependabot[bot]
4ddf8306cd build(deps): bump serde_with from 3.8.3 to 3.9.0
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.8.3 to 3.9.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.8.3...v3.9.0)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 09:33:43 +02:00
dependabot[bot]
b8e6ca2f5a build(deps): bump serde_with from 3.8.2 to 3.8.3
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.8.2...v3.8.3)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 10:29:10 +02:00
dependabot[bot]
d1d64a048a build(deps): bump serde_with from 3.8.1 to 3.8.2
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.8.1 to 3.8.2.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.8.1...v3.8.2)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 12:35:29 +02:00
Quentin Gliech
7e93f08ecd Update Cargo.lock and update cargo-deny exceptions 2024-05-02 14:32:05 +02:00
dependabot[bot]
8a4fd311ad build(deps): bump serde_with from 3.7.0 to 3.8.1
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.7.0...v3.8.1)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-30 18:12:31 +02:00
Quentin Gliech
d1542e6866 Replace parse-display with manual Display/FromStr impls 2024-03-19 16:38:46 +01:00
Kévin Commaille
3303e939ca Add account management URL for clients
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-19 15:05:27 +01:00
dependabot[bot]
f6b19c0d52 build(deps): bump serde_with from 3.6.0 to 3.7.0
Bumps [serde_with](https://github.com/jonasbb/serde_with) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/jonasbb/serde_with/releases)
- [Commits](https://github.com/jonasbb/serde_with/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: serde_with
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 10:40:19 +01:00
dependabot[bot]
244db9f4a6 build(deps): bump parse-display from 0.8.2 to 0.9.0
Bumps [parse-display](https://github.com/frozenlib/parse-display) from 0.8.2 to 0.9.0.
- [Changelog](https://github.com/frozenlib/parse-display/blob/master/CHANGELOG.md)
- [Commits](https://github.com/frozenlib/parse-display/compare/v0.8.2...v0.9.0)

---
updated-dependencies:
- dependency-name: parse-display
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 18:44:10 +01:00
Quentin Gliech
1627fc6945 Upgrade chrono and replace deprecated methods usage 2024-03-18 17:26:40 +01:00
Quentin Gliech
0da21bb50c Implement the device access token request 2024-02-02 18:01:51 +01:00
Quentin Gliech
fc78e7bf7e Implement the device code authorisation request 2024-02-02 18:01:51 +01:00
Quentin Gliech
306c99d49d Bump most Rust dependencies 2024-02-02 15:37:05 +01:00
Quentin Gliech
bae0848090 Set crates descriptions for crates we publish 2023-12-07 17:10:57 +01:00
Quentin Gliech
dc66b5b18f Prepare workspace to publish OIDC crates 2023-12-07 16:02:55 +01:00
Quentin Gliech
a7ff6b00aa Enable clippy lints on a workspace level
This enables a lot more lints than before in some crates, so this fixed a lot of warnings as well.
2023-12-05 17:20:42 +01:00