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

Unified Diff: remoting/protocol/negotiating_client_authenticator.h

Issue 1788943002: Revert of Move NegotiatingClientAuthentication creation to ChromotingClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: remoting/protocol/negotiating_client_authenticator.h
diff --git a/remoting/protocol/negotiating_client_authenticator.h b/remoting/protocol/negotiating_client_authenticator.h
index 0867d1035b7f4b28df6d4d92c378b8475adca4cd..abdb58ca6ebef28b407795290201e4610c50ec9f 100644
--- a/remoting/protocol/negotiating_client_authenticator.h
+++ b/remoting/protocol/negotiating_client_authenticator.h
@@ -18,30 +18,18 @@
namespace remoting {
namespace protocol {
-struct ClientAuthenticationConfig {
- ClientAuthenticationConfig();
- ~ClientAuthenticationConfig();
-
- // Used for all authenticators.
- std::string host_id;
-
- // Used for pairing authenticators
- std::string pairing_client_id;
- std::string pairing_secret;
-
- // Used for shared secret authenticators.
- FetchSecretCallback fetch_secret_callback;
-
- // Used for third party authenticators.
- FetchThirdPartyTokenCallback fetch_third_party_token_callback;
-};
-
// Client-side implementation of NegotiatingAuthenticatorBase.
// See comments in negotiating_authenticator_base.h for a general explanation.
class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase {
public:
- explicit NegotiatingClientAuthenticator(
- const ClientAuthenticationConfig& config);
+ // TODO(jamiewalch): Pass ClientConfig instead of separate parameters.
+ NegotiatingClientAuthenticator(
+ const std::string& client_pairing_id,
+ const std::string& shared_secret,
+ const std::string& authentication_tag,
+ const FetchSecretCallback& fetch_secret_callback,
+ const FetchThirdPartyTokenCallback& fetch_third_party_token_callback);
+
~NegotiatingClientAuthenticator() override;
// Overriden from Authenticator.
@@ -76,7 +64,18 @@
const base::Closure& resume_callback,
const std::string& shared_secret);
- ClientAuthenticationConfig config_;
+ // Used for pairing authenticators
+ std::string client_pairing_id_;
+ std::string shared_secret_;
+
+ // Used for all authenticators.
+ std::string authentication_tag_;
+
+ // Used for shared secret authenticators.
+ FetchSecretCallback fetch_secret_callback_;
+
+ // Used for third party authenticators.
+ FetchThirdPartyTokenCallback fetch_third_party_token_callback_;
// Internal NegotiatingClientAuthenticator data.
bool method_set_by_host_ = false;
« no previous file with comments | « remoting/protocol/negotiating_authenticator_unittest.cc ('k') | remoting/protocol/negotiating_client_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698