Commit 4fea9bed authored by yilkal's avatar yilkal Committed by Chromium LUCI CQ

Provide the added EDU account to online flow

This cl provides a PostMessageAPI interface that
can be used to fetch the EDU account that is being
added to the family link user's profile. The email
is needed as part of the consent logging that is required
in the online flow.

Bug: 1156497
Change-Id: I8e1bc0bb067f57e4d298ff160cb11954fdc9a346
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2579717Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarDan S <danan@chromium.org>
Commit-Queue: Yilkal Abe <yilkal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#835296}
parent 27c67fbb
......@@ -153,6 +153,8 @@ export class EduCoexistenceController extends PostMessageAPIServer {
'saveGuestFlowState', this.saveGuestFlowState_.bind(this));
this.registerMethod(
'fetchGuestFlowState', this.fetchGuestFlowState_.bind(this));
this.registerMethod(
'getEduAccountEmail', this.getEduAccountEmail_.bind(this));
// Add listeners for Authenticator.
this.addAuthExtHostListeners_();
......@@ -267,6 +269,15 @@ export class EduCoexistenceController extends PostMessageAPIServer {
return {'state': this.guestFlowState_};
}
/**
* @param {!Array} unused Placeholder unused empty parameter.
* @return {!String} The edu-account email that is being added to the device.
*/
getEduAccountEmail_(unused) {
console.assert(this.userInfo_);
return this.userInfo_.email;
}
/**
* @private
* Notifies the API that there was an unrecoverable error during the flow.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment