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

Unified Diff: remoting/protocol/pin_client_authenticator.h

Issue 12518027: Protocol / client plugin changes to support interactively asking for a PIN (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 9 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/pin_client_authenticator.h
diff --git a/remoting/protocol/pin_client_authenticator.h b/remoting/protocol/pin_client_authenticator.h
new file mode 100644
index 0000000000000000000000000000000000000000..e07c03c286bccc4854e3f926e45329cca742d778
--- /dev/null
+++ b/remoting/protocol/pin_client_authenticator.h
@@ -0,0 +1,57 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_PROTOCOL_PIN_CLIENT_AUTHENTICATOR_H_
+#define REMOTING_PROTOCOL_PIN_CLIENT_AUTHENTICATOR_H_
+
+#include "base/callback_forward.h"
+#include "remoting/protocol/authentication_method.h"
+#include "remoting/protocol/authenticator.h"
+
+namespace buzz {
+class XmlElement;
+}
+
+namespace remoting {
+namespace protocol {
+
+class PinFetcher;
+
+class PinClientAuthenticator : public Authenticator {
Sergey Ulanov 2013/03/17 21:29:21 Please add a comment to explain what this is for.
rmsousa 2013/03/18 21:07:26 Done.
+ public:
+ PinClientAuthenticator(AuthenticationMethod::HashFunction hash_function,
+ const std::string& authentication_tag,
+ scoped_ptr<PinFetcher> pin_fetcher,
+ Authenticator::State initial_state,
+ const base::Closure& resume_callback);
+
+ virtual ~PinClientAuthenticator();
+
+ // Authenticator interface.
+ virtual State state() const OVERRIDE;
+ virtual RejectionReason rejection_reason() const OVERRIDE;
+ virtual void ProcessMessage(const buzz::XmlElement* message,
+ const base::Closure& resume_callback) OVERRIDE;
+ virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE;
+ virtual scoped_ptr<ChannelAuthenticator>
+ CreateChannelAuthenticator() const OVERRIDE;
+
+ private:
+ void OnPinFetched(
+ Authenticator::State initial_state,
+ const base::Closure& resume_callback,
+ const std::string& shared_secret);
+
+ AuthenticationMethod::HashFunction hash_function_;
+ std::string authentication_tag_;
+ scoped_ptr<PinFetcher> pin_fetcher_;
+
+ scoped_ptr<Authenticator> underlying_;
+ DISALLOW_COPY_AND_ASSIGN(PinClientAuthenticator);
+};
+
+} // namespace protocol
+} // namespace remoting
+
+#endif // REMOTING_PROTOCOL_PIN_CLIENT_AUTHENTICATOR_H_

Powered by Google App Engine
This is Rietveld 408576698