| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ | 5 #ifndef REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ |
| 6 #define REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ | 6 #define REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "remoting/protocol/authentication_method.h" | 14 #include "remoting/protocol/authentication_method.h" |
| 15 #include "remoting/protocol/authenticator.h" | 15 #include "remoting/protocol/authenticator.h" |
| 16 #include "remoting/protocol/third_party_host_authenticator.h" |
| 16 | 17 |
| 17 namespace remoting { | 18 namespace remoting { |
| 18 | 19 |
| 19 class RsaKeyPair; | 20 class RsaKeyPair; |
| 20 | 21 |
| 21 namespace protocol { | 22 namespace protocol { |
| 22 | 23 |
| 23 class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory { | 24 class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory { |
| 24 public: | 25 public: |
| 25 Me2MeHostAuthenticatorFactory( | 26 Me2MeHostAuthenticatorFactory( |
| 26 const std::string& local_cert, | 27 const std::string& local_cert, |
| 27 scoped_refptr<RsaKeyPair> key_pair, | 28 scoped_refptr<RsaKeyPair> key_pair, |
| 28 const SharedSecretHash& shared_secret_hash); | 29 const SharedSecretHash& shared_secret_hash, |
| 30 scoped_refptr<ThirdPartyHostAuthenticator::TokenValidatorFactory> |
| 31 token_validator_factory); |
| 29 virtual ~Me2MeHostAuthenticatorFactory(); | 32 virtual ~Me2MeHostAuthenticatorFactory(); |
| 30 | 33 |
| 31 // AuthenticatorFactory interface. | 34 // AuthenticatorFactory interface. |
| 32 virtual scoped_ptr<Authenticator> CreateAuthenticator( | 35 virtual scoped_ptr<Authenticator> CreateAuthenticator( |
| 33 const std::string& local_jid, | 36 const std::string& local_jid, |
| 34 const std::string& remote_jid, | 37 const std::string& remote_jid, |
| 35 const buzz::XmlElement* first_message) OVERRIDE; | 38 const buzz::XmlElement* first_message) OVERRIDE; |
| 36 | 39 |
| 37 private: | 40 private: |
| 38 std::string local_jid_prefix_; | 41 std::string local_jid_prefix_; |
| 39 std::string local_cert_; | 42 std::string local_cert_; |
| 40 scoped_refptr<RsaKeyPair> key_pair_; | 43 scoped_refptr<RsaKeyPair> key_pair_; |
| 41 SharedSecretHash shared_secret_hash_; | 44 SharedSecretHash shared_secret_hash_; |
| 45 scoped_refptr<ThirdPartyHostAuthenticator::TokenValidatorFactory> |
| 46 token_validator_factory_; |
| 42 | 47 |
| 43 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); | 48 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); |
| 44 }; | 49 }; |
| 45 | 50 |
| 46 } // namespace protocol | 51 } // namespace protocol |
| 47 } // namespace remoting | 52 } // namespace remoting |
| 48 | 53 |
| 49 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ | 54 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ |
| OLD | NEW |