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

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: rmsousa's comments. 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..1c6e5a00a912d1e3f3fea7ad6b01767bca09afe0 100644
--- a/remoting/protocol/negotiating_client_authenticator.h
+++ b/remoting/protocol/negotiating_client_authenticator.h
@@ -27,7 +27,10 @@ typedef base::Callback<void(
// See comments in negotiating_authenticator_base.h for a general explanation.
class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase {
public:
+ // TODO(jamiewalch): Pass ClientConfig instead of separate parameters.
Wez 2013/05/18 20:08:36 nit: SGTM but let's split out the auth-related mem
Jamie 2013/05/21 01:24:34 SGTM.
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 +58,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
Wez 2013/05/18 20:08:36 Would it make more sense to add a getter to Authen
Jamie 2013/05/21 01:24:34 Maybe, but I don't think it needs to be done as pa
+ // 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,6 +70,10 @@ class NegotiatingClientAuthenticator : public NegotiatingAuthenticatorBase {
const base::Closure& resume_callback,
const std::string& shared_secret);
+ // Used for pairing authenticators
+ std::string client_pairing_id_;
+ std::string shared_secret_;
+
// Used for both authenticators.
Wez 2013/05/18 20:08:36 nit: This probably needs updating, since there are
Jamie 2013/05/21 01:24:34 Updated.
std::string authentication_tag_;

Powered by Google App Engine
This is Rietveld 408576698