summaryrefslogtreecommitdiffstats
path: root/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2023-09-05 12:37:36 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2023-10-17 13:53:46 +0000
commit5a424f4a7b188b75da63eb697f63558af0b17f6f (patch)
tree54c427fcbc567dac8181ab5fd22d20e72cc51609 /chromium/chrome/browser/resources/gaia_auth_host/authenticator.js
parentacbcf08a6dffdfe90a6eaf661fcd6923f0de2447 (diff)
BASELINE: Update Chromium to 116.0.5845.183
Change-Id: Iaaf57e02c218c93993a5044c659b63674e2c8a12 Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/512320 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/resources/gaia_auth_host/authenticator.js')
-rw-r--r--chromium/chrome/browser/resources/gaia_auth_host/authenticator.js22
1 files changed, 4 insertions, 18 deletions
diff --git a/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js b/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js
index ed2d753c314..3e2f7629a6e 100644
--- a/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -112,15 +112,10 @@ export let AuthCompletedCredentials;
*/
export let AuthParams;
-// TODO(rogerta): should use gaia URL from GaiaUrls::gaia_url() instead
-// of hardcoding the prod URL here. As is, this does not work with staging
-// environments.
-const IDP_ORIGIN = 'https://accounts.google.com/';
const SIGN_IN_HEADER = 'google-accounts-signin';
const EMBEDDED_FORM_HEADER = 'google-accounts-embedded';
const LOCATION_HEADER = 'location';
const SERVICE_ID = 'chromeoslogin';
-const EMBEDDED_SETUP_CHROMEOS_ENDPOINT_V2 = 'embedded/setup/v2/chromeos';
const SAML_REDIRECTION_PATH = 'samlredirect';
const BLANK_PAGE_URL = 'about:blank';
@@ -719,9 +714,7 @@ export class Authenticator extends EventTarget {
this.authMode = authMode;
this.resetStates();
this.authCompletedFired_ = false;
- // gaiaUrl parameter is used for testing. Once defined, it is never
- // changed.
- this.idpOrigin_ = data.gaiaUrl || IDP_ORIGIN;
+ this.idpOrigin_ = data.gaiaUrl;
this.isConstrainedWindow_ = data.constrained === '1';
this.clientId_ = data.clientId;
this.dontResizeNonEmbeddedPages = data.dontResizeNonEmbeddedPages;
@@ -754,10 +747,6 @@ export class Authenticator extends EventTarget {
this.isLoaded_ = true;
}
- constructChromeOSAPIUrl_() {
- return this.idpOrigin_ + EMBEDDED_SETUP_CHROMEOS_ENDPOINT_V2;
- }
-
/**
* Reloads the authenticator component.
*/
@@ -793,12 +782,9 @@ export class Authenticator extends EventTarget {
return url;
}
- let url;
- if (data.gaiaPath) {
- url = this.idpOrigin_ + data.gaiaPath;
- } else {
- url = this.constructChromeOSAPIUrl_();
- }
+ assert(this.idpOrigin_ !== undefined, "this.idpOrigin_ must be defined");
+ assert(data.gaiaPath !== undefined, "data.gaiaPath must be defined");
+ let url = this.idpOrigin_ + data.gaiaPath;
if (data.chromeType) {
url = appendParam(url, 'chrometype', data.chromeType);