Commit Graph

13223 Commits

Author SHA1 Message Date
Kévin Commaille
e1fe479008 refactor(oauth): Get rid of OAuthError::MissingDeviceId
Since we are the ones generating the device ID, we have a way to avoid this error. Even if in practice, it's probably always included in the server's response.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-20 16:02:18 +00:00
Kévin Commaille
530659b59d feat(oauth): Allow user to log into the same session again
Can be useful with soft logouts, without requiring the user to recreate a new Client to log in again.

Returns an error if the new session is different from the current one.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-20 16:02:18 +00:00
Kévin Commaille
45dd96e30a refactor(oauth): Merge finish_authorization and finish_login
That way users only need to call finish_login, since there is no other
reason to call finish_authorization currently.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-20 16:02:18 +00:00
Hugh Nimmo-Smith
3f4c1fd1bb feat(widgets, element-call): Update the widget url generation
Fixes: #4793

There was a previous PR https://github.com/matrix-org/matrix-rust-sdk/pull/4802 which attempted to implement this, but missed some backwards compatibility needs.

This updated PR has the original commit and then additional commits to add the compatibility (along with tests for the new intent param generally).
2025-03-20 14:28:45 +00:00
Benjamin Bouvier
5acaaf5865 fix(ffi): call the back-pagination status callback immediately matrix-sdk-ffi/20250320 2025-03-20 10:26:54 +01:00
Benjamin Bouvier
156501dbbd chore(event cache): add logs here and there 2025-03-20 10:26:54 +01:00
Hugh Nimmo-Smith
a0eb9340d5 Revert "feat(widgets, element-call) Update the widget url generation (#4802)"
This reverts commit 3b9ae3e65e.
2025-03-19 17:49:21 +01:00
Jonas Richard Richter
dbdbfd0b38 feat(notification): Add support for custom conditional push rules (#4587)
---
Signed-off-by: Jonas Richard Richter <jonas-richard.richter@telekom.de>
2025-03-19 12:50:02 +01:00
Ivan Enderlin
1d9d4d3b3a chore(sdk): Annotate RoomEventCacheState::remove_events with #[instrument].
This patch annotates `RoomEventCacheState::remove_events` with the
`#[instrument]` proc-macro so that it is logged when called.
2025-03-19 12:15:59 +01:00
Ivan Enderlin
8d16b3265c refactor(sdk): RoomEventCacheState checks if events to remove aren't empty.
This patch updates `RoomEventCacheState::remove_events` to check whether
the set of events are not empty before removing them. When removing
`in_memory_events`, it avoids taking a write lock on the `RoomEvents`
for nothing for example.
2025-03-19 12:15:59 +01:00
Ivan Enderlin
9c37a0393c fix(base): Check the lazy_previous of the first chunk matches the new first chunk.
This patch adds a new check when inserting a new first chunk. It makes
some tests to fail but because they were not realistic. This patch then
updates these tests.
2025-03-19 11:18:05 +01:00
Ivan Enderlin
82ef6232e7 doc(sdk): Precise in which context a variable can or cannot be used. 2025-03-19 11:02:09 +01:00
Timo
3b9ae3e65e feat(widgets, element-call) Update the widget url generation (#4802)
Fixes: https://github.com/matrix-org/matrix-rust-sdk/issues/4793

Co-authored-by: Valere <bill.carson@valrsoft.com>
2025-03-19 11:29:07 +02:00
Kévin Commaille
a539518cd4 chore: Add changelog for Oidc renaming
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
f61cd60147 refactor(oauth): Change the Oauth prefix in test utils with OAuth
For consistency.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
b9c970dc43 refactor(oauth): Rename OauthGrantType to OAuthGrantType
For consistency.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
ba5e395a59 refactor(oauth): Change Oauth prefix for error types to OAuth
For consistency.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
c46e6623fe refactor(oauth): Rename OauthClient and OauthHttpClient to OAuthClient and OAuthHttpClient
For consistency

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
7ad1b113dc doc(oauth): Change mentions of OpenID Connect to OAuth 2.0
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
c0d3ed1a90 refactor(oauth): Rename provider_metadata to server_metadata
"Provider" is an OpenID Connect term. OAuth 2.0 uses the "authorization
server" term.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
00d7a77ebe refactor(encryption): Rename OidcCrossSigningResetInfo to OAuthCrossSigningResetInfo
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
f29d3fd666 refactor(oauth): Rename OidcAuthCodeUrlBuilder to OAuthAuthCodeUrlBuilder
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
47204830a9 refactor(oauth): Rename OidcError to OAuthError
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
f4bb14a30e refactor(oauth): Rename OidcSession to OAuthSession
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
0a345a3124 refactor(oauth): Rename OidcAuthData to OAuthAuthData
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
450a66ad11 refactor(oauth): Rename OidcCtx to OAuthCtx
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
6f3694cfa9 refactor(oauth): Rename Oidc API to OAuth
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
1658610f93 refactor(sdk): Rename oidc module to oauth
Since we mostly use OAuth 2.0 now.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 17:18:34 +01:00
Kévin Commaille
f9b1bdb22d chore: Add changelog for LocalServerBuilder
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 09:55:01 +01:00
Kévin Commaille
f8abb85e9e refactor(oidc_cli): Use LocalServerBuilder
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 09:55:01 +01:00
Kévin Commaille
1b5e6462ee refactor(sdk): Use LocalServerBuilder with SsoLoginBuilder
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 09:55:01 +01:00
Kévin Commaille
fbdd8839e6 feat(sdk): Expose a local server builder
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-18 09:55:01 +01:00
dependabot[bot]
d86117ac70 chore(deps): bump crate-ci/typos from 1.30.1 to 1.30.2
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.30.1 to 1.30.2.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crate-ci/typos/compare/v1.30.1...v1.30.2)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 20:24:01 +01:00
dependabot[bot]
914b7125cf chore(deps): bump tj-actions/changed-files
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 to 0fee5fb278312d962ff465bb38dc4cae9f446de2.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](dcc7a0cba8...0fee5fb278)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 18:32:00 +02:00
Richard van der Hoff
ad0223cafb Merge pull request #4775 from matrix-org/rav/history_sharing/room_key_bundle
crypto: support for building key bundles
2025-03-17 11:45:38 +00:00
Richard van der Hoff
a870c02eab test: snapshot test for HistoricRoomKey::debug 2025-03-17 11:24:52 +00:00
Richard van der Hoff
002e77616d crypto: support for building key bundles
Add a method to CryptoStore which will construct a key bundle, ready for
encrypting and sharing with invited users.

Part of https://github.com/matrix-org/matrix-rust-sdk/issues/4504
2025-03-17 11:24:52 +00:00
Michael Telatynski
d777e68c4a Pin tj-actions/changed-files
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-03-17 10:26:15 +00:00
Ivan Enderlin
cabb345a1c fix(xtask): Add --limit 100 to gh pr list.
Because yes, some weeks, we are very productive!

This patch adds `--limit 100` to `gh pr list` so that we are sure to not
miss pull requests if there are many.
2025-03-14 18:04:33 +01:00
Kévin Commaille
2f08f27b59 chore: Add changelog about removing mas-oidc-client
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
3a7b0e9404 refactor(oidc): Remove dependency on mas-oidc-client
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
7713ce768a refactor(oidc): Create ClientMetadata type
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
aea573d001 refactor(oidc): Import code to register a client
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
7ca6494efa refactor(oidc): Remove support for software statement
It is not mentionned in MSC2966
2025-03-14 18:03:34 +01:00
Kévin Commaille
6f44853bf7 refactor(oidc): Use Url for the issuer
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
2c6c818005 refactor(oidc): Use ruma's server metadata type
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
abc4fbc2f7 refactor(oidc): Import code to discover OIDC provider configuration
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
9adff21f78 refactor(oidc): Import code for building the account management URL
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-03-14 18:03:34 +01:00
Kévin Commaille
91f9ef85ae refactor(oidc): Add type alias for oauth2 errors
To have less verbose and more predictable error types.
2025-03-14 18:03:34 +01:00
Ivan Enderlin
17c6ad6b70 test(ui): Ensure Timeline runs a redecryption for all UTD.
This patch adds two tests, ensuring UTD stored in the event cache are
decrypted, whether they come from the initial items or paginated items.
2025-03-14 14:18:21 +01:00