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

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.js

Issue 1954453002: Skip the SAML confirm password screen when a single password is scraped (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix indentation Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/gaia_auth_host/authenticator.js
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
index 4159df30217fb4a29688f9a6a3651a135242e753..f73eb7c690e1ddead228daeb27f3a92eff8e581f 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -650,6 +650,14 @@ cr.define('cr.login', function() {
// password when it is available but not a mandatory requirement.
console.warn('Authenticator: No password scraped for SAML.');
} else if (this.needPassword) {
+ if (this.samlHandler_.scrapedPasswordCount == 1) {
+ // If we scraped exactly one password, we verify that it and complete
+ // the authentication right away.
+ var passwords = this.samlHandler_.getConsolidatedScrapedPasswords_();
+ this.verifyConfirmedPassword(passwords[0]);
xiyuan 2016/05/04 19:35:04 getConsolidatedScrapedPasswords_ is private and we
afakhry 2016/05/04 20:16:15 Done.
+ return;
+ }
+
if (this.confirmPasswordCallback) {
// Confirm scraped password. The flow follows in
// verifyConfirmedPassword.
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698