OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview An UI component to host gaia auth extension in an iframe. | 6 * @fileoverview An UI component to host gaia auth extension in an iframe. |
7 * After the component binds with an iframe, call its {@code load} to start the | 7 * After the component binds with an iframe, call its {@code load} to start the |
8 * authentication flow. There are two events would be raised after this point: | 8 * authentication flow. There are two events would be raised after this point: |
9 * a 'ready' event when the authentication UI is ready to use and a 'completed' | 9 * a 'ready' event when the authentication UI is ready to use and a 'completed' |
10 * event when the authentication is completed successfully. If caller is | 10 * event when the authentication is completed successfully. If caller is |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 var msg = {method: 'redirectToSignin'}; | 343 var msg = {method: 'redirectToSignin'}; |
344 this.frame_.contentWindow.postMessage(msg, AUTH_URL_BASE); | 344 this.frame_.contentWindow.postMessage(msg, AUTH_URL_BASE); |
345 return; | 345 return; |
346 } | 346 } |
347 this.onAuthSuccess_({email: msg.email, | 347 this.onAuthSuccess_({email: msg.email, |
348 password: msg.password, | 348 password: msg.password, |
349 useOffline: msg.method == 'offlineLogin', | 349 useOffline: msg.method == 'offlineLogin', |
350 usingSAML: msg.usingSAML || false, | 350 usingSAML: msg.usingSAML || false, |
351 chooseWhatToSync: msg.chooseWhatToSync, | 351 chooseWhatToSync: msg.chooseWhatToSync, |
352 skipForNow: msg.skipForNow || false, | 352 skipForNow: msg.skipForNow || false, |
353 sessionIndex: msg.sessionIndex || ''}); | 353 sessionIndex: msg.sessionIndex || '', |
| 354 confirmUntrustedSignin: |
| 355 msg.confirmUntrustedSignin || false}); |
354 return; | 356 return; |
355 } | 357 } |
356 | 358 |
357 if (msg.method == 'retrieveAuthenticatedUserEmail') { | 359 if (msg.method == 'retrieveAuthenticatedUserEmail') { |
358 if (this.retrieveAuthenticatedUserEmailCallback_) { | 360 if (this.retrieveAuthenticatedUserEmailCallback_) { |
359 this.retrieveAuthenticatedUserEmailCallback_(msg.attemptToken, | 361 this.retrieveAuthenticatedUserEmailCallback_(msg.attemptToken, |
360 msg.apiUsed); | 362 msg.apiUsed); |
361 } else { | 363 } else { |
362 console.error( | 364 console.error( |
363 'GaiaAuthHost: Invalid retrieveAuthenticatedUserEmailCallback_.'); | 365 'GaiaAuthHost: Invalid retrieveAuthenticatedUserEmailCallback_.'); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 | 416 |
415 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS; | 417 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS; |
416 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS; | 418 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS; |
417 GaiaAuthHost.AuthMode = AuthMode; | 419 GaiaAuthHost.AuthMode = AuthMode; |
418 GaiaAuthHost.AuthFlow = AuthFlow; | 420 GaiaAuthHost.AuthFlow = AuthFlow; |
419 | 421 |
420 return { | 422 return { |
421 GaiaAuthHost: GaiaAuthHost | 423 GaiaAuthHost: GaiaAuthHost |
422 }; | 424 }; |
423 }); | 425 }); |
OLD | NEW |