This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
MSC2918 Refresh tokens implementation #9450
Merged
Merged
Changes from 44 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
fe80ef5
WIP: MSC2918
sandhose 523d8cf
MSC2918: implement refresh tokens
sandhose 358da22
MSC2918: Changelog
sandhose f53466e
MSC2918: fix mypy and lint errors
sandhose 324d7bf
MSC2918: add PostgreSQL schema
sandhose 450a962
MSC2918: do not invalidate refresh token immediately & fix tests
sandhose 022485e
MSC2918: lint fixes
sandhose 51ba1c3
MSC2918: also delete refresh tokens when logging out
sandhose d281f7e
MSC2918: fix field name in migrations
sandhose f499d63
MSC2918: merge SQLite and PostgreSQL schema deltas
sandhose e402a07
MSC2918: fix sample config
sandhose adc6eab
MSC2918: use parse_boolean to get query parameter value
sandhose 6963fe0
MSC2918: use attr.s instead of TypedDict
sandhose 318b74c
MSC2918: remove unused sequence in refresh_tokens
sandhose 29806b4
MSC2918: try fixing port_db script when a table references itself
sandhose 72e5c25
MSC2918: lint
sandhose eb9f680
Revert "MSC2918: use attr.s instead of TypedDict"
sandhose 417a34a
MSC2918: random signed token instead of macaroons for refresh tokens
sandhose 45177a6
MSC2918: some docstrings and minor changes
sandhose e37f53a
MSC2918: expires_in -> expires_in_ms
sandhose 262d1ab
MSC2918: properly figure out whether an access token was already used…
sandhose 75ce9e5
MSC2918: implement for registration endpoint
sandhose 6f2cc61
MSC2918: properly replace old-next refresh token
sandhose b7b17ed
MSC2918: add tests
sandhose c7eab51
MSC2918: use secrets.token_bytes instead of random.randbytes
sandhose 088e023
MSC2918: mark new column as boolean in port_db
sandhose 6247228
MSC2918: fix existing auth test
sandhose 67d4c9e
Merge remote-tracking branch 'upstream/develop' into sandhose/msc2918
sandhose 2ec853c
MSC2918: use the same pattern as access tokens for refresh tokens
sandhose 9e7ce1f
MSC2918: lint: remove unused import
sandhose 45e2eaf
MSC2918: fix typing issue
sandhose c20f94a
MSC2918: properly check refresh_token parameter
sandhose 790baac
MSC2918: cleanup old refresh token generation code
sandhose 01b0740
MSC2918: add more docstrings
sandhose 797e0d3
MSC2918: change refresh token API error codes
sandhose 8f8f369
MSC2918: disable refresh tokens when session_lifetime is set
sandhose 6024ed8
MSC2918: add missing docstring
sandhose 908c279
MSC2918: temp: mark the access token as used only once
sandhose cdfd871
MSC2918: explicit cast on access_tokens.used
sandhose b169a62
Revert "MSC2918: explicit cast on access_tokens.used"
sandhose e07ef9b
MSC2918: properly fix access_tokens.used column on old SQLite
sandhose 4cf49a6
Merge remote-tracking branch 'upstream/develop' into sandhose/msc2918
sandhose ef0e051
MSC2918: properly fix "mark_access_token_as_used" by caching it
sandhose 7adfe0c
Merge remote-tracking branch 'upstream/develop' into sandhose/msc2918
sandhose ab443a3
MSC2918: add comments as suggested by richvdh
sandhose 0060bc9
Merge remote-tracking branch 'upstream/develop' into sandhose/msc2918
sandhose 18628fc
MSC2918: make access_tokens.used nullable
sandhose bcc33e2
MSC2918: 403 when using a refresh token twice
sandhose ddfc2a4
MSC2918: clarify comment about access_token_lifetime and session_life…
sandhose a013064
Merge remote-tracking branch 'upstream/develop' into sandhose/msc2918
sandhose 9fe5556
MSC2918: fix refresh token invalidation test
sandhose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Implement refresh tokens as specified by [MSC2918](https://github.com/matrix-org/matrix-doc/pull/2918). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.