OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <include src="saml_handler.js"> | 5 <include src="saml_handler.js"> |
6 | 6 |
7 /** | 7 /** |
8 * @fileoverview An UI component to authenciate to Chrome. The component hosts | 8 * @fileoverview An UI component to authenciate to Chrome. The component hosts |
9 * IdP web pages in a webview. A client who is interested in monitoring | 9 * IdP web pages in a webview. A client who is interested in monitoring |
10 * authentication events should pass a listener object of type | 10 * authentication events should pass a listener object of type |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 new CustomEvent('attemptLogin', {detail: msg.email})); | 438 new CustomEvent('attemptLogin', {detail: msg.email})); |
439 } | 439 } |
440 } else if (msg.method == 'dialogShown') { | 440 } else if (msg.method == 'dialogShown') { |
441 this.dispatchEvent(new Event('dialogShown')); | 441 this.dispatchEvent(new Event('dialogShown')); |
442 } else if (msg.method == 'dialogHidden') { | 442 } else if (msg.method == 'dialogHidden') { |
443 this.dispatchEvent(new Event('dialogHidden')); | 443 this.dispatchEvent(new Event('dialogHidden')); |
444 } else if (msg.method == 'backButton') { | 444 } else if (msg.method == 'backButton') { |
445 this.dispatchEvent(new CustomEvent('backButton', {detail: msg.show})); | 445 this.dispatchEvent(new CustomEvent('backButton', {detail: msg.show})); |
446 } else if (msg.method == 'showView') { | 446 } else if (msg.method == 'showView') { |
447 this.dispatchEvent(new Event('showView')); | 447 this.dispatchEvent(new Event('showView')); |
| 448 } else if (msg.method == 'identifierEntered') { |
| 449 this.dispatchEvent(new CustomEvent( |
| 450 'identifierEntered', |
| 451 {detail: {accountIdentifier: msg.accountIdentifier}})); |
448 } else { | 452 } else { |
449 console.warn('Unrecognized message from GAIA: ' + msg.method); | 453 console.warn('Unrecognized message from GAIA: ' + msg.method); |
450 } | 454 } |
451 }; | 455 }; |
452 | 456 |
453 /** | 457 /** |
454 * Invoked by the hosting page to verify the Saml password. | 458 * Invoked by the hosting page to verify the Saml password. |
455 */ | 459 */ |
456 Authenticator.prototype.verifyConfirmedPassword = function(password) { | 460 Authenticator.prototype.verifyConfirmedPassword = function(password) { |
457 if (!this.samlHandler_.verifyConfirmedPassword(password)) { | 461 if (!this.samlHandler_.verifyConfirmedPassword(password)) { |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 Authenticator.AuthMode = AuthMode; | 691 Authenticator.AuthMode = AuthMode; |
688 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; | 692 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; |
689 | 693 |
690 return { | 694 return { |
691 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old | 695 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old |
692 // iframe-based flow is deprecated. | 696 // iframe-based flow is deprecated. |
693 GaiaAuthHost: Authenticator, | 697 GaiaAuthHost: Authenticator, |
694 Authenticator: Authenticator | 698 Authenticator: Authenticator |
695 }; | 699 }; |
696 }); | 700 }); |
OLD | NEW |