Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: remoting/protocol/me2me_host_authenticator_factory.h

Issue 12313085: Host-side third party token validation (Closed) Base URL: http://git.chromium.org/chromium/src.git@third_party_auth_protocol
Patch Set: Add TODO comment Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};
« no previous file with comments | « remoting/protocol/it2me_host_authenticator_factory.cc ('k') | remoting/protocol/me2me_host_authenticator_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698