| 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/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "remoting/protocol/authentication_method.h" | 13 #include "remoting/protocol/authentication_method.h" |
| 14 #include "remoting/protocol/authenticator.h" | 14 #include "remoting/protocol/authenticator.h" |
| 15 #include "remoting/protocol/third_party_authenticator.h" |
| 15 | 16 |
| 16 namespace remoting { | 17 namespace remoting { |
| 17 namespace protocol { | 18 namespace protocol { |
| 18 | 19 |
| 19 class KeyPair; | 20 class KeyPair; |
| 20 | 21 |
| 21 class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory { | 22 class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory { |
| 22 public: | 23 public: |
| 23 // Doesn't take ownership of |local_private_key|. | 24 // Doesn't take ownership of |local_private_key|. |
| 24 Me2MeHostAuthenticatorFactory( | 25 Me2MeHostAuthenticatorFactory( |
| 25 const std::string& local_cert, | 26 const std::string& local_cert, |
| 26 scoped_ptr<KeyPair> key_pair, | 27 scoped_ptr<KeyPair> key_pair, |
| 27 const SharedSecretHash& shared_secret_hash); | 28 const SharedSecretHash& shared_secret_hash, |
| 29 const std::string& token_url, |
| 30 const std::string& token_validation_url, |
| 31 ThirdPartyAuthenticator::TokenValidatorFactory* |
| 32 third_party_token_validator_factory); |
| 28 virtual ~Me2MeHostAuthenticatorFactory(); | 33 virtual ~Me2MeHostAuthenticatorFactory(); |
| 29 | 34 |
| 30 // AuthenticatorFactory interface. | 35 // AuthenticatorFactory interface. |
| 31 virtual scoped_ptr<Authenticator> CreateAuthenticator( | 36 virtual scoped_ptr<Authenticator> CreateAuthenticator( |
| 32 const std::string& local_jid, | 37 const std::string& local_jid, |
| 33 const std::string& remote_jid, | 38 const std::string& remote_jid, |
| 34 const buzz::XmlElement* first_message) OVERRIDE; | 39 const buzz::XmlElement* first_message) OVERRIDE; |
| 35 | 40 |
| 36 private: | 41 private: |
| 37 std::string local_jid_prefix_; | 42 std::string local_jid_prefix_; |
| 38 std::string local_cert_; | 43 std::string local_cert_; |
| 39 scoped_ptr<KeyPair> key_pair_; | 44 scoped_ptr<KeyPair> key_pair_; |
| 40 SharedSecretHash shared_secret_hash_; | 45 SharedSecretHash shared_secret_hash_; |
| 46 std::string third_party_token_url_; |
| 47 std::string third_party_token_validation_url_; |
| 48 ThirdPartyAuthenticator::TokenValidatorFactory* |
| 49 third_party_token_validator_factory_; |
| 41 | 50 |
| 42 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); | 51 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); |
| 43 }; | 52 }; |
| 44 | 53 |
| 45 } // namespace protocol | 54 } // namespace protocol |
| 46 } // namespace remoting | 55 } // namespace remoting |
| 47 | 56 |
| 48 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ | 57 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ |
| OLD | NEW |