| Index: remoting/protocol/me2me_host_authenticator_factory.h
|
| diff --git a/remoting/protocol/me2me_host_authenticator_factory.h b/remoting/protocol/me2me_host_authenticator_factory.h
|
| index e6375a23eb4799bb7f8746fc0e62b28b05095a2e..7d0eebe83e836c00b9d5c2f48d3c7e5ed07fa3e0 100644
|
| --- a/remoting/protocol/me2me_host_authenticator_factory.h
|
| +++ b/remoting/protocol/me2me_host_authenticator_factory.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "remoting/protocol/authentication_method.h"
|
| #include "remoting/protocol/authenticator.h"
|
| +#include "remoting/protocol/third_party_host_authenticator.h"
|
|
|
| namespace remoting {
|
|
|
| @@ -22,10 +23,22 @@ namespace protocol {
|
|
|
| class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory {
|
| public:
|
| - Me2MeHostAuthenticatorFactory(
|
| + // Create a factory that dispenses shared secret authenticators.
|
| + static scoped_ptr<AuthenticatorFactory> CreateWithSharedSecret(
|
| const std::string& local_cert,
|
| scoped_refptr<RsaKeyPair> key_pair,
|
| const SharedSecretHash& shared_secret_hash);
|
| + // Create a factory that dispenses third party authenticators.
|
| + static scoped_ptr<AuthenticatorFactory> CreateWithThirdPartyAuth(
|
| + const std::string& local_cert,
|
| + scoped_refptr<RsaKeyPair> key_pair,
|
| + scoped_ptr<ThirdPartyHostAuthenticator::TokenValidatorFactory>
|
| + token_validator_factory);
|
| + // Create a factory that dispenses rejecting authenticators (used when the
|
| + // host config/policy is inconsistent)
|
| + static scoped_ptr<AuthenticatorFactory> CreateRejecting();
|
| +
|
| + Me2MeHostAuthenticatorFactory();
|
| virtual ~Me2MeHostAuthenticatorFactory();
|
|
|
| // AuthenticatorFactory interface.
|
| @@ -35,11 +48,17 @@ class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory {
|
| const buzz::XmlElement* first_message) OVERRIDE;
|
|
|
| private:
|
| - std::string local_jid_prefix_;
|
| + // Used for all host authenticators.
|
| std::string local_cert_;
|
| scoped_refptr<RsaKeyPair> key_pair_;
|
| +
|
| + // Used only for shared secret host authenticators.
|
| SharedSecretHash shared_secret_hash_;
|
|
|
| + // Used only for third party host authenticators.
|
| + scoped_ptr<ThirdPartyHostAuthenticator::TokenValidatorFactory>
|
| + token_validator_factory_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory);
|
| };
|
|
|
|
|