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

Unified Diff: remoting/protocol/negotiating_host_authenticator.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/negotiating_host_authenticator.h
diff --git a/remoting/protocol/negotiating_host_authenticator.h b/remoting/protocol/negotiating_host_authenticator.h
index 4ff53f6abdd4f99108f67cd6fe5cb1fafd0121c8..588fee2bf0e390bdb640bfb801cd15337a9712d3 100644
--- a/remoting/protocol/negotiating_host_authenticator.h
+++ b/remoting/protocol/negotiating_host_authenticator.h
@@ -15,6 +15,7 @@
#include "remoting/protocol/authentication_method.h"
#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/negotiating_authenticator_base.h"
+#include "remoting/protocol/third_party_host_authenticator.h"
namespace remoting {
@@ -26,14 +27,20 @@ namespace protocol {
// See comments in negotiating_authenticator_base.h for a general explanation.
class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase {
public:
+ virtual ~NegotiatingHostAuthenticator();
+
// Creates a host authenticator, using a fixed shared secret/PIN hash.
- NegotiatingHostAuthenticator(
+ static scoped_ptr<Authenticator> CreateWithSharedSecret(
const std::string& local_cert,
scoped_refptr<RsaKeyPair> key_pair,
const std::string& shared_secret_hash,
AuthenticationMethod::HashFunction hash_function);
- virtual ~NegotiatingHostAuthenticator();
+ // Creates a host authenticator, using third party authentication.
+ static scoped_ptr<Authenticator> CreateWithThirdPartyAuth(
+ const std::string& local_cert,
+ scoped_refptr<RsaKeyPair> key_pair,
+ scoped_ptr<ThirdPartyHostAuthenticator::TokenValidator> token_validator);
// Overriden from Authenticator.
virtual void ProcessMessage(const buzz::XmlElement* message,
@@ -41,6 +48,10 @@ class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase {
virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE;
private:
+ NegotiatingHostAuthenticator(
+ const std::string& local_cert,
+ scoped_refptr<RsaKeyPair> key_pair);
+
// (Asynchronously) creates an authenticator, and stores it in
// |current_authenticator_|. Authenticators that can be started in either
// state will be created in |preferred_initial_state|.
@@ -50,8 +61,13 @@ class NegotiatingHostAuthenticator : public NegotiatingAuthenticatorBase {
std::string local_cert_;
scoped_refptr<RsaKeyPair> local_key_pair_;
+
+ // Used only for shared secret host authenticators.
std::string shared_secret_hash_;
+ // Used only for third party host authenticators.
+ scoped_ptr<ThirdPartyHostAuthenticator::TokenValidator> token_validator_;
+
DISALLOW_COPY_AND_ASSIGN(NegotiatingHostAuthenticator);
};
« no previous file with comments | « remoting/protocol/negotiating_authenticator_unittest.cc ('k') | remoting/protocol/negotiating_host_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698