| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // password. This is useful for re-auth scenarios, where chrome needs the | 103 // password. This is useful for re-auth scenarios, where chrome needs the |
| 104 // user to authenticate for a specific account and only that account. | 104 // user to authenticate for a specific account and only that account. |
| 105 // | 105 // |
| 106 // 3/ If 'email' is supplied, and 'readOnlyEmail' is falsy, gaia will | 106 // 3/ If 'email' is supplied, and 'readOnlyEmail' is falsy, gaia will |
| 107 // prefill the email text field using the given email address, but the user | 107 // prefill the email text field using the given email address, but the user |
| 108 // can still change it and then proceed. This is used on desktop when the | 108 // can still change it and then proceed. This is used on desktop when the |
| 109 // user disconnects their profile then reconnects, to encourage them to use | 109 // user disconnects their profile then reconnects, to encourage them to use |
| 110 // the same account. | 110 // the same account. |
| 111 'email', | 111 'email', |
| 112 'readOnlyEmail', | 112 'readOnlyEmail', |
| 113 'realm', |
| 113 ]; | 114 ]; |
| 114 | 115 |
| 115 /** | 116 /** |
| 116 * Initializes the authenticator component. | 117 * Initializes the authenticator component. |
| 117 * @param {webview|string} webview The webview element or its ID to host IdP | 118 * @param {webview|string} webview The webview element or its ID to host IdP |
| 118 * web pages. | 119 * web pages. |
| 119 * @constructor | 120 * @constructor |
| 120 */ | 121 */ |
| 121 function Authenticator(webview) { | 122 function Authenticator(webview) { |
| 122 this.webview_ = typeof webview == 'string' ? $(webview) : webview; | 123 this.webview_ = typeof webview == 'string' ? $(webview) : webview; |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 Authenticator.AuthMode = AuthMode; | 899 Authenticator.AuthMode = AuthMode; |
| 899 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; | 900 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; |
| 900 | 901 |
| 901 return { | 902 return { |
| 902 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old | 903 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old |
| 903 // iframe-based flow is deprecated. | 904 // iframe-based flow is deprecated. |
| 904 GaiaAuthHost: Authenticator, | 905 GaiaAuthHost: Authenticator, |
| 905 Authenticator: Authenticator | 906 Authenticator: Authenticator |
| 906 }; | 907 }; |
| 907 }); | 908 }); |
| OLD | NEW |