Files
sousa-gecko/testing/web-platform/tests/fedcm/support/intercept_header.py
T
Yi Gu 03ff8e7ea6 Bug 2028446 [wpt PR 58885] - [FedCM] Update the header name in the IdP-initiated API, a=testonly
Automatic update from web-platform-tests
[FedCM] Update the header name in the IdP-initiated API

The old header name will be removed after a couple of milestones to make
the experiment backward compatible.

Fixed: b:493591934
Change-Id: I726ab03b18beecda809119941e30e847edeb1961
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7718598
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Commit-Queue: Yi Gu <yigu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1608059}

--

wpt-commits: 5c82efa0c2d9bebcd96515c042c3953e5ad4bfa1
wpt-pr: 58885
2026-04-17 08:34:18 +00:00

10 lines
433 B
Python

def main(request, response):
port = request.server.config.ports["https"][0]
hostname = request.url_parts.hostname
base_url = f"https://{hostname}:{port}".encode('utf-8')
header_value = b"client_id=\"1234\", params=\"redirect=post\", config_url=\"%s/fedcm/support/manifest_with_continue_on.json\"" % (base_url)
response.headers.set(b"federation-initiate-request", header_value)
return "Sent header: %s" % (header_value)