Skip to content

Commit

Permalink
[FedCM] Prototype User Info API behind a flag (2/3)
Browse files Browse the repository at this point in the history
User Info API can be used by IDPs to render personalized buttons. See
proposal at w3c-fedid/FedCM#382.

This patch:
 - Implement the proposal to return the requested user info.

Next:
 - Add metrics and console logs

Bug: 1304402
Change-Id: Ie9a970d4be4c4ca0e5d4cb3879823517b74fabcc
  • Loading branch information
yi-gu authored and chromium-wpt-export-bot committed Dec 12, 2022
1 parent 3b6b8de commit 87f7b81
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions credential-management/support/fedcm-mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ export class MockFederatedAuthRequest {
this.pendingPromiseResolve_ = null;
}

// Implements
// RequestUserInfo(IdentityProviderGetParameters idp_get_param) =>
// (RequestUserInfoStatus status, array<IdentityUserInfo>? user_info);
async requestUserInfo(idp_get_param) {
return Promise.resolve({
status: "",
user_info: ""
});
}

async logoutRps(logout_endpoints) {
return Promise.resolve({
status: this.logoutRpsStatus_
Expand Down

0 comments on commit 87f7b81

Please sign in to comment.