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

Side by Side Diff: remoting/protocol/negotiating_client_authenticator.h

Issue 1794433002: Use ClientAuthenticationConfig in PairingClientAuthenticator (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 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 REMOTING_PROTOCOL_NEGOTIATING_CLIENT_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_NEGOTIATING_CLIENT_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_NEGOTIATING_CLIENT_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_NEGOTIATING_CLIENT_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "remoting/protocol/authenticator.h" 14 #include "remoting/protocol/authenticator.h"
15 #include "remoting/protocol/client_authentication_config.h"
15 #include "remoting/protocol/negotiating_authenticator_base.h" 16 #include "remoting/protocol/negotiating_authenticator_base.h"
16 #include "remoting/protocol/third_party_client_authenticator.h" 17 #include "remoting/protocol/third_party_client_authenticator.h"
17 18
18 namespace remoting { 19 namespace remoting {
19 namespace protocol { 20 namespace protocol {
20 21
21 struct ClientAuthenticationConfig {
22 ClientAuthenticationConfig();
23 ~ClientAuthenticationConfig();
24
25 // Used for all authenticators.
26 std::string host_id;
27
28 // Used for pairing authenticators
29 std::string pairing_client_id;
30 std::string pairing_secret;
31
32 // Used for shared secret authenticators.
33 FetchSecretCallback fetch_secret_callback;
34
35 // Used for third party authenticators.
36 FetchThirdPartyTokenCallback fetch_third_party_token_callback;
37 };
38
39 // Client-side implementation of NegotiatingAuthenticatorBase. 22 // Client-side implementation of NegotiatingAuthenticatorBase.
40 // See comments in negotiating_authenticator_base.h for a general explanation. 23 // See comments in negotiating_authenticator_base.h for a general explanation.
41 class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase { 24 class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase {
42 public: 25 public:
43 explicit NegotiatingClientAuthenticator( 26 explicit NegotiatingClientAuthenticator(
44 const std::string& local_id, 27 const std::string& local_id,
45 const std::string& remote_id, 28 const std::string& remote_id,
46 const ClientAuthenticationConfig& config); 29 const ClientAuthenticationConfig& config);
47 ~NegotiatingClientAuthenticator() override; 30 ~NegotiatingClientAuthenticator() override;
48 31
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool method_set_by_host_ = false; 69 bool method_set_by_host_ = false;
87 base::WeakPtrFactory<NegotiatingClientAuthenticator> weak_factory_; 70 base::WeakPtrFactory<NegotiatingClientAuthenticator> weak_factory_;
88 71
89 DISALLOW_COPY_AND_ASSIGN(NegotiatingClientAuthenticator); 72 DISALLOW_COPY_AND_ASSIGN(NegotiatingClientAuthenticator);
90 }; 73 };
91 74
92 } // namespace protocol 75 } // namespace protocol
93 } // namespace remoting 76 } // namespace remoting
94 77
95 #endif // REMOTING_PROTOCOL_NEGOTIATING_CLIENT_AUTHENTICATOR_H_ 78 #endif // REMOTING_PROTOCOL_NEGOTIATING_CLIENT_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « remoting/protocol/client_authentication_config.cc ('k') | remoting/protocol/negotiating_client_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698