OLD | NEW |
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_HOST_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ |
6 #define REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ | 6 #define REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 namespace protocol { | 23 namespace protocol { |
24 | 24 |
25 class TokenValidatorFactory; | 25 class TokenValidatorFactory; |
26 | 26 |
27 // Host-side implementation of NegotiatingAuthenticatorBase. | 27 // Host-side implementation of NegotiatingAuthenticatorBase. |
28 // See comments in negotiating_authenticator_base.h for a general explanation. | 28 // See comments in negotiating_authenticator_base.h for a general explanation. |
29 class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase { | 29 class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase { |
30 public: | 30 public: |
31 ~NegotiatingHostAuthenticator() override; | 31 ~NegotiatingHostAuthenticator() override; |
32 | 32 |
33 // Creates a host authenticator for It2Me host. | 33 // Creates a host authenticator, using a PIN or access code. If |
34 static scoped_ptr<NegotiatingHostAuthenticator> CreateForIt2Me( | 34 // |pairing_registry| is non-nullptr then the paired methods will be offered, |
| 35 // supporting PIN-less authentication. |
| 36 static scoped_ptr<NegotiatingHostAuthenticator> CreateWithSharedSecret( |
35 const std::string& local_id, | 37 const std::string& local_id, |
36 const std::string& remote_id, | 38 const std::string& remote_id, |
37 const std::string& local_cert, | 39 const std::string& local_cert, |
38 scoped_refptr<RsaKeyPair> key_pair, | |
39 const std::string& access_code); | |
40 | |
41 // Creates a host authenticator, using a fixed PIN. If |pairing_registry| is | |
42 // non-nullptr then the paired methods will be offered, supporting | |
43 // PIN-less authentication. | |
44 static scoped_ptr<NegotiatingHostAuthenticator> CreateWithPin( | |
45 const std::string& local_id, | |
46 const std::string& remote_id, | |
47 const std::string& local_cert, | |
48 scoped_refptr<RsaKeyPair> key_pair, | 40 scoped_refptr<RsaKeyPair> key_pair, |
49 const std::string& pin_hash, | 41 const std::string& pin_hash, |
50 scoped_refptr<PairingRegistry> pairing_registry); | 42 scoped_refptr<PairingRegistry> pairing_registry); |
51 | 43 |
52 // Creates a host authenticator, using third party authentication. | 44 // Creates a host authenticator, using third party authentication. |
53 static scoped_ptr<NegotiatingHostAuthenticator> CreateWithThirdPartyAuth( | 45 static scoped_ptr<NegotiatingHostAuthenticator> CreateWithThirdPartyAuth( |
54 const std::string& local_id, | 46 const std::string& local_id, |
55 const std::string& remote_id, | 47 const std::string& remote_id, |
56 const std::string& local_cert, | 48 const std::string& local_cert, |
57 scoped_refptr<RsaKeyPair> key_pair, | 49 scoped_refptr<RsaKeyPair> key_pair, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 83 |
92 std::string client_id_; | 84 std::string client_id_; |
93 | 85 |
94 DISALLOW_COPY_AND_ASSIGN(NegotiatingHostAuthenticator); | 86 DISALLOW_COPY_AND_ASSIGN(NegotiatingHostAuthenticator); |
95 }; | 87 }; |
96 | 88 |
97 } // namespace protocol | 89 } // namespace protocol |
98 } // namespace remoting | 90 } // namespace remoting |
99 | 91 |
100 #endif // REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ | 92 #endif // REMOTING_PROTOCOL_NEGOTIATING_HOST_AUTHENTICATOR_H_ |
OLD | NEW |