Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Side by Side Diff: chrome/browser/resources/gaia_auth_host/gaia_auth_host.js

Issue 1115993002: ChromeOS Gaia: SAML password confirmation dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 var msg = {method: 'redirectToSignin'}; 364 var msg = {method: 'redirectToSignin'};
365 this.frame_.contentWindow.postMessage(msg, AUTH_URL_BASE); 365 this.frame_.contentWindow.postMessage(msg, AUTH_URL_BASE);
366 return; 366 return;
367 } 367 }
368 this.onAuthSuccess_({authCodeOnly: true, authCode: msg.authCode}); 368 this.onAuthSuccess_({authCodeOnly: true, authCode: msg.authCode});
369 return; 369 return;
370 } 370 }
371 371
372 if (msg.method == 'confirmPassword') { 372 if (msg.method == 'confirmPassword') {
373 if (this.confirmPasswordCallback_) 373 if (this.confirmPasswordCallback_)
374 this.confirmPasswordCallback_(msg.passwordCount); 374 this.confirmPasswordCallback_(msg.email, msg.passwordCount);
375 else 375 else
376 console.error('GaiaAuthHost: Invalid confirmPasswordCallback_.'); 376 console.error('GaiaAuthHost: Invalid confirmPasswordCallback_.');
377 return; 377 return;
378 } 378 }
379 379
380 if (msg.method == 'noPassword') { 380 if (msg.method == 'noPassword') {
381 if (this.noPasswordCallback_) 381 if (this.noPasswordCallback_)
382 this.noPasswordCallback_(msg.email); 382 this.noPasswordCallback_(msg.email);
383 else 383 else
384 console.error('GaiaAuthHost: Invalid noPasswordCallback_.'); 384 console.error('GaiaAuthHost: Invalid noPasswordCallback_.');
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS; 448 GaiaAuthHost.SUPPORTED_PARAMS = SUPPORTED_PARAMS;
449 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS; 449 GaiaAuthHost.LOCALIZED_STRING_PARAMS = LOCALIZED_STRING_PARAMS;
450 GaiaAuthHost.AuthMode = AuthMode; 450 GaiaAuthHost.AuthMode = AuthMode;
451 GaiaAuthHost.AuthFlow = AuthFlow; 451 GaiaAuthHost.AuthFlow = AuthFlow;
452 452
453 return { 453 return {
454 GaiaAuthHost: GaiaAuthHost 454 GaiaAuthHost: GaiaAuthHost
455 }; 455 };
456 }); 456 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698