Skip to content

Commit

Permalink
Bug 1940282 [wpt PR 49954] - Add support for Ad-Auction-Result-Nonce …
Browse files Browse the repository at this point in the history
…header for PA B&A, a=testonly

Automatic update from web-platform-tests
Add support for Ad-Auction-Result-Nonce header for PA B&A

Add support for the alternate authorization flow for Protected
Audiences Bidding and Auction response (as described in
WICG/turtledove#1233).

This feature is behind the FledgeBiddingAndAuctionNonceSupport
feature flag which is going to be enabled by default (for a
waterfall rollout in M133).

Bug: 385128725
Change-Id: Id3c622241c82ed0b71037bfeb1ca5432cd6e66dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6109795
Reviewed-by: Maks Orlovich <morlovichchromium.org>
Commit-Queue: Russ Hamilton <behamiltongoogle.com>
Reviewed-by: Brendon Tiszka <tiszkachromium.org>
Cr-Commit-Position: refs/heads/main{#1403077}

--

wpt-commits: 48f9ec1e463fbe03e411a77dae446b7c6de4f577
wpt-pr: 49954

UltraBlame original commit: a563508c0d80ba13ea308f1cac33bbf0b1e1eadf
  • Loading branch information
marco-c committed Jan 16, 2025
1 parent 7839793 commit 933f603
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 150 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
def main(request, response):
response.status = (200, b"OK")
response.headers.set(b"Content-Type", b"text/plain")
hash_list = request.GET.get_list(b"hashes")
response.headers.set(b"Ad-Auction-Result",
b",".join(hash_list))
if b"hashes" in request.GET:
hash_list = request.GET.get_list(b"hashes")
response.headers.set(b"Ad-Auction-Result",
b",".join(hash_list))
if b"nonces" in request.GET:
nonce_list = request.GET.get_list(b"nonces")
response.headers.set(b"Ad-Auction-Result-Nonce",
b",".join(nonce_list))
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,15 @@ BA.authorizeServerResponseHashes = async function(hashes) {
await fetch(authorizeURL, {adAuctionHeaders: true});
};



BA.authorizeServerResponseNonces = async function(nonces) {
let authorizeURL =
new URL('resources/authorize-server-response.py', window.location);
authorizeURL.searchParams.append('nonces', nonces.join(','));
await fetch(authorizeURL, {adAuctionHeaders: true});
};

BA.configureCoordinator = async function() {

return 'https://{{hosts[][]}}';
Expand Down
Loading

0 comments on commit 933f603

Please sign in to comment.