diff options
author | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-06 05:01:02 +0000 |
---|---|---|
committer | rmsousa@chromium.org <rmsousa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-06 05:01:02 +0000 |
commit | 34e25581f9c2513ef1b294cadfa6c4ea250c288c (patch) | |
tree | 553a7350cbe2a4bb5776ba1a90503ba44b8766d4 /remoting/client/plugin/chromoting_instance.h | |
parent | 65cda75721ab60e85c7bb9a37a92be7ea7fd8054 (diff) | |
download | chromium_src-34e25581f9c2513ef1b294cadfa6c4ea250c288c.zip chromium_src-34e25581f9c2513ef1b294cadfa6c4ea250c288c.tar.gz chromium_src-34e25581f9c2513ef1b294cadfa6c4ea250c288c.tar.bz2 |
Client plugin changes to support third party authentication.
This creates a TokenFetcher implementation that on the client that uses the webapp to direct the user to fetch a token and secret from the given token URL. If the URL requires interactive authentication, the webapp will open a tab/window for the user to authenticate. Once the webapp has a token and shared secret, it uses the callback to send it back to the authentication layer.
This also glues the third party authentication method to the NegotiatingAuthenticator.
BUG=115899
Review URL: https://chromiumcodereview.appspot.com/12475020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/client/plugin/chromoting_instance.h')
-rw-r--r-- | remoting/client/plugin/chromoting_instance.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h index a57275a..c6c8f578f 100644 --- a/remoting/client/plugin/chromoting_instance.h +++ b/remoting/client/plugin/chromoting_instance.h @@ -40,6 +40,7 @@ #include "remoting/protocol/input_event_tracker.h" #include "remoting/protocol/mouse_input_filter.h" #include "remoting/protocol/negotiating_client_authenticator.h" +#include "remoting/protocol/third_party_client_authenticator.h" namespace base { class DictionaryValue; @@ -57,6 +58,7 @@ class ChromotingStats; class ClientContext; class FrameConsumerProxy; class PepperAudioPlayer; +class PepperTokenFetcher; class PepperView; class PepperXmppProxy; class RectangleUpdateDecoder; @@ -108,6 +110,8 @@ class ChromotingInstance : virtual void OnConnectionReady(bool ready) OVERRIDE; virtual protocol::ClipboardStub* GetClipboardStub() OVERRIDE; virtual protocol::CursorShapeStub* GetCursorShapeStub() OVERRIDE; + virtual scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> + GetTokenFetcher(const std::string& host_public_key) OVERRIDE; // protocol::ClipboardStub interface. virtual void InjectClipboardEvent( @@ -147,6 +151,13 @@ class ChromotingInstance : static bool LogToUI(int severity, const char* file, int line, size_t message_start, const std::string& str); + // Requests the webapp to fetch a third-party token. + void FetchThirdPartyToken( + const GURL& token_url, + const std::string& host_public_key, + const std::string& scope, + const base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher); + private: FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup); @@ -170,6 +181,8 @@ class ChromotingInstance : void PauseVideo(bool pause); void PauseAudio(bool pause); void OnPinFetched(const std::string& pin); + void OnThirdPartyTokenFetched(const std::string& token, + const std::string& shared_secret); // Helper method to post messages to the webapp. void PostChromotingMessage(const std::string& method, @@ -227,6 +240,8 @@ class ChromotingInstance : bool use_async_pin_dialog_; protocol::SecretFetchedCallback secret_fetched_callback_; + base::WeakPtr<PepperTokenFetcher> pepper_token_fetcher_; + base::WeakPtrFactory<ChromotingInstance> weak_factory_; DISALLOW_COPY_AND_ASSIGN(ChromotingInstance); |