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 25 matching lines...) Expand all Loading... |
36 | 36 |
37 /** | 37 /** |
38 * Origin of the gaia sign in page. | 38 * Origin of the gaia sign in page. |
39 * @const | 39 * @const |
40 */ | 40 */ |
41 var GAIA_ORIGIN = 'https://accounts.google.com'; | 41 var GAIA_ORIGIN = 'https://accounts.google.com'; |
42 | 42 |
43 /** | 43 /** |
44 * Supported params of auth extension. For a complete list, check out the | 44 * Supported params of auth extension. For a complete list, check out the |
45 * auth extension's main.js. | 45 * auth extension's main.js. |
46 * @type {!Array.<string>} | 46 * @type {!Array<string>} |
47 * @const | 47 * @const |
48 */ | 48 */ |
49 var SUPPORTED_PARAMS = [ | 49 var SUPPORTED_PARAMS = [ |
50 'gaiaUrl', // Gaia url to use; | 50 'gaiaUrl', // Gaia url to use; |
51 'gaiaPath', // Gaia path to use without a leading slash; | 51 'gaiaPath', // Gaia path to use without a leading slash; |
52 'hl', // Language code for the user interface; | 52 'hl', // Language code for the user interface; |
53 'email', // Pre-fill the email field in Gaia UI; | 53 'email', // Pre-fill the email field in Gaia UI; |
54 'service', // Name of Gaia service; | 54 'service', // Name of Gaia service; |
55 'continueUrl', // Continue url to use; | 55 'continueUrl', // Continue url to use; |
56 'frameUrl', // Initial frame URL to use. If empty defaults to gaiaUrl. | 56 'frameUrl', // Initial frame URL to use. If empty defaults to gaiaUrl. |
57 'constrained' // Whether the extension is loaded in a constrained window; | 57 'constrained' // Whether the extension is loaded in a constrained window; |
58 ]; | 58 ]; |
59 | 59 |
60 /** | 60 /** |
61 * Supported localized strings. For a complete list, check out the auth | 61 * Supported localized strings. For a complete list, check out the auth |
62 * extension's offline.js | 62 * extension's offline.js |
63 * @type {!Array.<string>} | 63 * @type {!Array<string>} |
64 * @const | 64 * @const |
65 */ | 65 */ |
66 var LOCALIZED_STRING_PARAMS = [ | 66 var LOCALIZED_STRING_PARAMS = [ |
67 'stringSignIn', | 67 'stringSignIn', |
68 'stringEmail', | 68 'stringEmail', |
69 'stringPassword', | 69 'stringPassword', |
70 'stringEmptyEmail', | 70 'stringEmptyEmail', |
71 'stringEmptyPassword', | 71 'stringEmptyPassword', |
72 'stringError' | 72 'stringError' |
73 ]; | 73 ]; |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 434 |
435 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS; | 435 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS; |
436 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS; | 436 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS; |
437 GaiaAuthHost.AuthMode = AuthMode; | 437 GaiaAuthHost.AuthMode = AuthMode; |
438 GaiaAuthHost.AuthFlow = AuthFlow; | 438 GaiaAuthHost.AuthFlow = AuthFlow; |
439 | 439 |
440 return { | 440 return { |
441 GaiaAuthHost: GaiaAuthHost | 441 GaiaAuthHost: GaiaAuthHost |
442 }; | 442 }; |
443 }); | 443 }); |
OLD | NEW |