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

Unified Diff: remoting/protocol/negotiating_client_authenticator.h

Issue 14793021: PairingAuthenticator implementation and plumbing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed clang errors. Created 7 years, 7 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_client_authenticator.h
diff --git a/remoting/protocol/negotiating_client_authenticator.h b/remoting/protocol/negotiating_client_authenticator.h
index 995cf1ddaab92d5f51df9fe220479ea91375e5ee..05a8b174027d599b406dad1b75ddf45be5937ece 100644
--- a/remoting/protocol/negotiating_client_authenticator.h
+++ b/remoting/protocol/negotiating_client_authenticator.h
@@ -19,15 +19,14 @@
namespace remoting {
namespace protocol {
-typedef base::Callback<void(const std::string& secret)> SecretFetchedCallback;
-typedef base::Callback<void(
- const SecretFetchedCallback& secret_fetched_callback)> FetchSecretCallback;
-
// Client-side implementation of NegotiatingAuthenticatorBase.
// See comments in negotiating_authenticator_base.h for a general explanation.
class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase {
public:
+ // TODO(jamiewalch): Pass ClientConfig instead of separate parameters.
NegotiatingClientAuthenticator(
+ const std::string& client_pairing_id,
+ const std::string& shared_secret,
const std::string& authentication_tag,
const FetchSecretCallback& fetch_secret_callback,
scoped_ptr<ThirdPartyClientAuthenticator::TokenFetcher> token_fetcher_,
@@ -55,9 +54,10 @@ class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase {
// and to instead reply with an alternative method. See the comments
// in negotiating_authenticator_base.h for more details.
//
- // Returns the preferred authenticator if possible, or NULL otherwise.
- scoped_ptr<Authenticator> CreatePreferredAuthenticator();
-
+ // Sets |current_authenticator_| and |current_method_| iff the client
+ // has a preferred authenticator that can optimistically send an initial
+ // message.
+ void CreatePreferredAuthenticator();
// Creates a V2Authenticator in state |initial_state| with the given
// |shared_secret|, then runs |resume_callback|.
@@ -66,7 +66,11 @@ class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase {
const base::Closure& resume_callback,
const std::string& shared_secret);
- // Used for both authenticators.
+ // Used for pairing authenticators
+ std::string client_pairing_id_;
+ std::string shared_secret_;
+
+ // Used for all authenticators.
std::string authentication_tag_;
// Used for shared secret authenticators.
« no previous file with comments | « remoting/protocol/negotiating_authenticator_unittest.cc ('k') | remoting/protocol/negotiating_client_authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698