diff options
author | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 09:00:23 +0000 |
---|---|---|
committer | jamiewalch@chromium.org <jamiewalch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-22 09:00:23 +0000 |
commit | 6434bfe41768fc8d86f77c6772721a60e356a01f (patch) | |
tree | e214bfb5547f84109633d879655d04c559a47033 /remoting/protocol/negotiating_client_authenticator.h | |
parent | 62efa785ae40cd8058db085d0d57dfe31dd3e49f (diff) | |
download | chromium_src-6434bfe41768fc8d86f77c6772721a60e356a01f.zip chromium_src-6434bfe41768fc8d86f77c6772721a60e356a01f.tar.gz chromium_src-6434bfe41768fc8d86f77c6772721a60e356a01f.tar.bz2 |
PairingAuthenticator implementation and plumbing.
This CL introduces the pairing authenticator classes, adds support for them
to the negotiating authenticator classes and some minimal plumbing.
BUG=156182
Review URL: https://chromiumcodereview.appspot.com/14793021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/negotiating_client_authenticator.h')
-rw-r--r-- | remoting/protocol/negotiating_client_authenticator.h | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/remoting/protocol/negotiating_client_authenticator.h b/remoting/protocol/negotiating_client_authenticator.h index 995cf1dd..05a8b17 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. |