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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h

Issue 2519823006: Chromad: Add authentication flow (Closed)
Patch Set: Created 4 years 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" 13 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h"
14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
15 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" 15 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
16 #include "chromeos/network/portal_detector/network_portal_detector.h" 16 #include "chromeos/network/portal_detector/network_portal_detector.h"
17 #include "net/base/net_errors.h" 17 #include "net/base/net_errors.h"
18 18
19 class AccountId; 19 class AccountId;
20 20
21 namespace chromeos { 21 namespace chromeos {
22 22
23 class Key;
23 class SigninScreenHandler; 24 class SigninScreenHandler;
24 class SigninScreenHandlerDelegate; 25 class SigninScreenHandlerDelegate;
25 26
26 // A class that handles WebUI hooks in Gaia screen. 27 // A class that handles WebUI hooks in Gaia screen.
27 class GaiaScreenHandler : public BaseScreenHandler, 28 class GaiaScreenHandler : public BaseScreenHandler,
28 public NetworkPortalDetector::Observer { 29 public NetworkPortalDetector::Observer {
29 public: 30 public:
30 enum FrameState { 31 enum FrameState {
31 FRAME_STATE_UNKNOWN = 0, 32 FRAME_STATE_UNKNOWN = 0,
32 FRAME_STATE_LOADING, 33 FRAME_STATE_LOADING,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 const std::string& password, 90 const std::string& password,
90 const std::string& auth_code, 91 const std::string& auth_code,
91 bool using_saml, 92 bool using_saml,
92 const std::string& gaps_cookie); 93 const std::string& gaps_cookie);
93 void HandleCompleteAuthenticationAuthCodeOnly(const std::string& auth_code); 94 void HandleCompleteAuthenticationAuthCodeOnly(const std::string& auth_code);
94 void HandleCompleteLogin(const std::string& gaia_id, 95 void HandleCompleteLogin(const std::string& gaia_id,
95 const std::string& typed_email, 96 const std::string& typed_email,
96 const std::string& password, 97 const std::string& password,
97 bool using_saml); 98 bool using_saml);
98 99
100 void HandleCompleteAdAuthentication(const std::string& user_name,
101 const std::string& password);
102
99 void HandleUsingSAMLAPI(); 103 void HandleUsingSAMLAPI();
100 void HandleScrapedPasswordCount(int password_count); 104 void HandleScrapedPasswordCount(int password_count);
101 void HandleScrapedPasswordVerificationFailed(); 105 void HandleScrapedPasswordVerificationFailed();
102 106
103 void HandleGaiaUIReady(); 107 void HandleGaiaUIReady();
104 108
105 void HandleToggleEasyBootstrap(); 109 void HandleToggleEasyBootstrap();
106 110
107 void HandleIdentifierEntered(const std::string& account_identifier); 111 void HandleIdentifierEntered(const std::string& account_identifier);
108 112
(...skipping 11 matching lines...) Expand all
120 } 124 }
121 125
122 // Kick off cookie / local storage cleanup. 126 // Kick off cookie / local storage cleanup.
123 void StartClearingCookies(const base::Closure& on_clear_callback); 127 void StartClearingCookies(const base::Closure& on_clear_callback);
124 void OnCookiesCleared(const base::Closure& on_clear_callback); 128 void OnCookiesCleared(const base::Closure& on_clear_callback);
125 129
126 // Kick off DNS cache flushing. 130 // Kick off DNS cache flushing.
127 void StartClearingDnsCache(); 131 void StartClearingDnsCache();
128 void OnDnsCleared(); 132 void OnDnsCleared();
129 133
134 // Callback for AuthPolicyClient.
135 void HandleAdAuth(const std::string& username,
136 const Key& key,
137 int code,
138 const std::string& uid);
139
140 // Callback for writing password into pipe.
141 void OnPasswordPipeReady(const std::string& user_name,
142 const Key& key,
143 base::ScopedFD password_fd);
144
130 // Show sign-in screen for the given credentials. 145 // Show sign-in screen for the given credentials.
131 void ShowSigninScreenForTest(const std::string& username, 146 void ShowSigninScreenForTest(const std::string& username,
132 const std::string& password); 147 const std::string& password);
133 // Attempts login for test. 148 // Attempts login for test.
134 void SubmitLoginFormForTest(); 149 void SubmitLoginFormForTest();
135 150
136 // Updates the member variable and UMA histogram indicating whether the 151 // Updates the member variable and UMA histogram indicating whether the
137 // principals API was used during SAML login. 152 // principals API was used during SAML login.
138 void SetSAMLPrincipalsAPIUsed(bool api_used); 153 void SetSAMLPrincipalsAPIUsed(bool api_used);
139 154
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 bool auth_extension_being_loaded_ = false; 266 bool auth_extension_being_loaded_ = false;
252 267
253 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; 268 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_;
254 269
255 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); 270 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler);
256 }; 271 };
257 272
258 } // namespace chromeos 273 } // namespace chromeos
259 274
260 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ 275 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698