Chromium Code Reviews| 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 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 655 } | 655 } |
| 656 | 656 |
| 657 // Fall through to finish the auth flow even if this.needPassword | 657 // Fall through to finish the auth flow even if this.needPassword |
| 658 // is true. This is because the flag is used as an intention to get | 658 // is true. This is because the flag is used as an intention to get |
| 659 // password when it is available but not a mandatory requirement. | 659 // password when it is available but not a mandatory requirement. |
| 660 console.warn('Authenticator: No password scraped for SAML.'); | 660 console.warn('Authenticator: No password scraped for SAML.'); |
| 661 } else if (this.needPassword) { | 661 } else if (this.needPassword) { |
| 662 if (this.samlHandler_.scrapedPasswordCount == 1) { | 662 if (this.samlHandler_.scrapedPasswordCount == 1) { |
| 663 // If we scraped exactly one password, we complete the authentication | 663 // If we scraped exactly one password, we complete the authentication |
| 664 // right away. | 664 // right away. |
| 665 this.password = this.samlHandler_.firstScrapedPassword; | 665 this.password_ = this.samlHandler_.firstScrapedPassword; |
|
xiyuan
2016/06/08 15:52:01
Oops. Missed this on review. :p
xiyuan
2016/06/08 15:53:16
I wonder whether we should extend SamlTest.Scraped
afakhry
2016/06/08 16:34:28
Done. Please take a look.
| |
| 666 this.onAuthCompleted_(); | 666 this.onAuthCompleted_(); |
| 667 return; | 667 return; |
| 668 } | 668 } |
| 669 | 669 |
| 670 if (this.confirmPasswordCallback) { | 670 if (this.confirmPasswordCallback) { |
| 671 // Confirm scraped password. The flow follows in | 671 // Confirm scraped password. The flow follows in |
| 672 // verifyConfirmedPassword. | 672 // verifyConfirmedPassword. |
| 673 this.confirmPasswordCallback(this.email_, | 673 this.confirmPasswordCallback(this.email_, |
| 674 this.samlHandler_.scrapedPasswordCount); | 674 this.samlHandler_.scrapedPasswordCount); |
| 675 return; | 675 return; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 863 Authenticator.AuthMode = AuthMode; | 863 Authenticator.AuthMode = AuthMode; |
| 864 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; | 864 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; |
| 865 | 865 |
| 866 return { | 866 return { |
| 867 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old | 867 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old |
| 868 // iframe-based flow is deprecated. | 868 // iframe-based flow is deprecated. |
| 869 GaiaAuthHost: Authenticator, | 869 GaiaAuthHost: Authenticator, |
| 870 Authenticator: Authenticator | 870 Authenticator: Authenticator |
| 871 }; | 871 }; |
| 872 }); | 872 }); |
| OLD | NEW |