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

Unified Diff: remoting/protocol/authenticator.h

Issue 1770923002: Remove dependency on V2Authenticator from ThirdParty and pairing authenticators. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/authenticator.h
diff --git a/remoting/protocol/authenticator.h b/remoting/protocol/authenticator.h
index 3211164723f55346377f7224127de3efdb0d8a1b..9657a22d020c6629a964b367e6a6c109f8d435eb 100644
--- a/remoting/protocol/authenticator.h
+++ b/remoting/protocol/authenticator.h
@@ -17,6 +17,7 @@ class XmlElement;
namespace remoting {
namespace protocol {
+class Authenticator;
class ChannelAuthenticator;
typedef base::Callback<void(const std::string& secret)> SecretFetchedCallback;
@@ -25,18 +26,16 @@ typedef base::Callback<void(
const SecretFetchedCallback& secret_fetched_callback)> FetchSecretCallback;
// Authenticator is an abstract interface for authentication protocol
-// implementations. Different implementations of this interface may be
-// used on each side of the connection depending of type of the auth
-// protocol. Client and host will repeatedly call their Authenticators
-// and deliver the messages they generate, until successful
-// authentication is reported.
+// implementations. Different implementations of this interface may be used on
+// each side of the connection depending of type of the authprotocol. Client and
Jamie 2016/03/07 21:40:18 s/authprotocol/auth protocol/
Sergey Ulanov 2016/03/07 22:45:05 Done.
+// host will repeatedly call their Authenticators and deliver the messages they
+// generate, until successful authentication is reported.
//
-// Authenticator may exchange multiple messages before session is
-// authenticated. Each message sent/received by an Authenticator is
-// delivered either in a session description inside session-initiate
-// and session-accept messages or in a session-info
-// message. Session-info messages are used only if authenticators need
-// to exchange more than one message.
+// Authenticator may exchange multiple messages before session is authenticated.
+// Each message sent/received by an Authenticator is delivered either in a
+// session description inside session-initiate and session-accept messages or in
+// a session-info message. Session-info messages are used only if authenticators
+// need to exchange more than one message.
class Authenticator {
public:
// Allowed state transitions:
@@ -72,6 +71,14 @@ class Authenticator {
PROTOCOL_ERROR,
};
+ // Callback used for layered Authenticator implementations, particularly
+ // third-party and pairing authenticators. They use this callback to create
+ // base SPAKE2 authenticators.
+ typedef base::Callback<scoped_ptr<Authenticator>(
+ const std::string& shared_secret,
+ Authenticator::State initial_state)>
+ CreateBaseAuthenticatorCallback;
+
// Returns true if |message| is an Authenticator message.
static bool IsAuthenticatorMessage(const buzz::XmlElement* message);
@@ -90,7 +97,7 @@ class Authenticator {
virtual State state() const = 0;
// Returns whether authentication has started. The chromoting host uses this
- // method to starts the back off process to prevent malicious clients from
+ // method to start the back off process to prevent malicious clients from
// guessing the PIN by spamming the host with auth requests.
virtual bool started() const = 0;
« no previous file with comments | « no previous file | remoting/protocol/negotiating_authenticator_base.cc » ('j') | remoting/protocol/pairing_authenticator_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698