| 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 /** | 5 /** |
| 6 * @fileoverview An UI component to authenciate to Chrome. The component hosts | 6 * @fileoverview An UI component to authenciate to Chrome. The component hosts |
| 7 * IdP web pages in a webview. A client who is interested in monitoring | 7 * IdP web pages in a webview. A client who is interested in monitoring |
| 8 * authentication events should pass a listener object of type | 8 * authentication events should pass a listener object of type |
| 9 * cr.login.GaiaAuthHost.Listener as defined in this file. After initialization, | 9 * cr.login.GaiaAuthHost.Listener as defined in this file. After initialization, |
| 10 * call {@code load} to start the authentication flow. | 10 * call {@code load} to start the authentication flow. |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 * Set focus in Gaia on default input. | 160 * Set focus in Gaia on default input. |
| 161 */ | 161 */ |
| 162 Authenticator.prototype.setFocus = function() { | 162 Authenticator.prototype.setFocus = function() { |
| 163 this.onFocus_(); | 163 this.onFocus_(); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 Authenticator.prototype.constructInitialFrameUrl_ = function(data) { | 166 Authenticator.prototype.constructInitialFrameUrl_ = function(data) { |
| 167 var url = this.idpOrigin_ + (data.gaiaPath || IDP_PATH); | 167 var url = this.idpOrigin_ + (data.gaiaPath || IDP_PATH); |
| 168 | 168 |
| 169 if (this.isMinuteMaidChromeOS) { | 169 if (this.isMinuteMaidChromeOS) { |
| 170 if (data.chromeType) |
| 171 url = appendParam(url, 'chrometype', data.chromeType); |
| 170 if (data.clientId) | 172 if (data.clientId) |
| 171 url = appendParam(url, 'client_id', data.clientId); | 173 url = appendParam(url, 'client_id', data.clientId); |
| 172 if (data.enterpriseDomain) | 174 if (data.enterpriseDomain) |
| 173 url = appendParam(url, 'managedomain', data.enterpriseDomain); | 175 url = appendParam(url, 'managedomain', data.enterpriseDomain); |
| 174 } else { | 176 } else { |
| 175 url = appendParam(url, 'continue', this.continueUrl_); | 177 url = appendParam(url, 'continue', this.continueUrl_); |
| 176 url = appendParam(url, 'service', data.service || SERVICE_ID); | 178 url = appendParam(url, 'service', data.service || SERVICE_ID); |
| 177 } | 179 } |
| 178 if (data.hl) | 180 if (data.hl) |
| 179 url = appendParam(url, 'hl', data.hl); | 181 url = appendParam(url, 'hl', data.hl); |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 Authenticator.AuthFlow = AuthFlow; | 413 Authenticator.AuthFlow = AuthFlow; |
| 412 Authenticator.AuthMode = AuthMode; | 414 Authenticator.AuthMode = AuthMode; |
| 413 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; | 415 Authenticator.SUPPORTED_PARAMS = SUPPORTED_PARAMS; |
| 414 | 416 |
| 415 return { | 417 return { |
| 416 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old | 418 // TODO(guohui, xiyuan): Rename GaiaAuthHost to Authenticator once the old |
| 417 // iframe-based flow is deprecated. | 419 // iframe-based flow is deprecated. |
| 418 GaiaAuthHost: Authenticator | 420 GaiaAuthHost: Authenticator |
| 419 }; | 421 }; |
| 420 }); | 422 }); |
| OLD | NEW |