| 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/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const std::string& pin_hash, | 35 const std::string& pin_hash, |
| 36 scoped_refptr<PairingRegistry> pairing_registry); | 36 scoped_refptr<PairingRegistry> pairing_registry); |
| 37 | 37 |
| 38 // Create a factory that dispenses third party authenticators. | 38 // Create a factory that dispenses third party authenticators. |
| 39 static scoped_ptr<AuthenticatorFactory> CreateWithThirdPartyAuth( | 39 static scoped_ptr<AuthenticatorFactory> CreateWithThirdPartyAuth( |
| 40 bool use_service_account, | 40 bool use_service_account, |
| 41 const std::string& host_owner, | 41 const std::string& host_owner, |
| 42 const std::string& local_cert, | 42 const std::string& local_cert, |
| 43 scoped_refptr<RsaKeyPair> key_pair, | 43 scoped_refptr<RsaKeyPair> key_pair, |
| 44 const std::string& required_client_domain, | 44 const std::string& required_client_domain, |
| 45 scoped_ptr<TokenValidatorFactory> token_validator_factory); | 45 scoped_refptr<TokenValidatorFactory> token_validator_factory); |
| 46 | 46 |
| 47 Me2MeHostAuthenticatorFactory(); | 47 Me2MeHostAuthenticatorFactory(); |
| 48 ~Me2MeHostAuthenticatorFactory() override; | 48 ~Me2MeHostAuthenticatorFactory() override; |
| 49 | 49 |
| 50 // AuthenticatorFactory interface. | 50 // AuthenticatorFactory interface. |
| 51 scoped_ptr<Authenticator> CreateAuthenticator( | 51 scoped_ptr<Authenticator> CreateAuthenticator( |
| 52 const std::string& local_jid, | 52 const std::string& local_jid, |
| 53 const std::string& remote_jid) override; | 53 const std::string& remote_jid) override; |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 // Used for all host authenticators. | 56 // Used for all host authenticators. |
| 57 bool use_service_account_; | 57 bool use_service_account_; |
| 58 std::string host_owner_; | 58 std::string host_owner_; |
| 59 std::string local_cert_; | 59 std::string local_cert_; |
| 60 scoped_refptr<RsaKeyPair> key_pair_; | 60 scoped_refptr<RsaKeyPair> key_pair_; |
| 61 std::string required_client_domain_; | 61 std::string required_client_domain_; |
| 62 | 62 |
| 63 // Used only for PIN-based host authenticators. | 63 // Used only for PIN-based host authenticators. |
| 64 std::string pin_hash_; | 64 std::string pin_hash_; |
| 65 | 65 |
| 66 // Used only for third party host authenticators. | 66 // Used only for third party host authenticators. |
| 67 scoped_ptr<TokenValidatorFactory> token_validator_factory_; | 67 scoped_refptr<TokenValidatorFactory> token_validator_factory_; |
| 68 | 68 |
| 69 // Used only for pairing host authenticators. | 69 // Used only for pairing host authenticators. |
| 70 scoped_refptr<PairingRegistry> pairing_registry_; | 70 scoped_refptr<PairingRegistry> pairing_registry_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); | 72 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 } // namespace protocol | 75 } // namespace protocol |
| 76 } // namespace remoting | 76 } // namespace remoting |
| 77 | 77 |
| 78 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ | 78 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ |
| OLD | NEW |