Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/19273.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Support for stable MSC4312 m.oauth UIA stage for resetting cross-signing identity with the OAuth 2.0 API.
3 changes: 2 additions & 1 deletion synapse/rest/client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ async def on_GET(self, request: SynapseRequest, stagetype: str) -> None:
if not session:
raise SynapseError(400, "No session supplied")

if stagetype == "org.matrix.cross_signing_reset":
# We support the unstable (`org.matrix.cross_signing_reset`) name from MSC4312 until enough clients have adopted the stable name (`m.oauth`).
if stagetype == "m.oauth" or stagetype == "org.matrix.cross_signing_reset":
if self.hs.config.mas.enabled:
assert isinstance(self.auth, MasDelegatedAuth)

Expand Down
10 changes: 10 additions & 0 deletions synapse/rest/client/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,14 @@ async def on_POST(self, request: SynapseRequest) -> tuple[int, JsonDict]:
{
"session": "dummy",
"flows": [
{"stages": ["m.oauth"]},
# The unstable name from MSC4312 should be supported until enough clients have adopted the stable (`m.oauth`) name:
{"stages": ["org.matrix.cross_signing_reset"]},
],
"params": {
"m.oauth": {
"url": url,
},
"org.matrix.cross_signing_reset": {
"url": url,
},
Expand Down Expand Up @@ -594,9 +599,14 @@ async def on_POST(self, request: SynapseRequest) -> tuple[int, JsonDict]:
{
"session": "dummy",
"flows": [
{"stages": ["m.oauth"]},
# The unstable name from MSC4312 should be supported until enough clients have adopted the stable (`m.oauth`) name:
{"stages": ["org.matrix.cross_signing_reset"]},
],
"params": {
"m.oauth": {
"url": url,
},
"org.matrix.cross_signing_reset": {
"url": url,
},
Expand Down
Loading