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

Unified Diff: remoting/jingle_glue/jingle_client.h

Issue 2749004: Token-based authentication for chromoting. (Closed)
Patch Set: - Created 10 years, 6 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
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/jingle_glue/jingle_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/jingle_glue/jingle_client.h
diff --git a/remoting/jingle_glue/jingle_client.h b/remoting/jingle_glue/jingle_client.h
index 56d97e1c6ea06f8c65f64b787bce2f45cede6e24..2a6804228e6983ebf873b34dd57884a119a24895 100644
--- a/remoting/jingle_glue/jingle_client.h
+++ b/remoting/jingle_glue/jingle_client.h
@@ -16,6 +16,10 @@ namespace talk_base {
class NetworkManager;
} // namespace talk_base
+namespace buzz {
+class PreXmppAuth;
+} // namespace buzz
+
namespace cricket {
class BasicPortAllocator;
class SessionManager;
@@ -63,9 +67,8 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>,
// only once. message_loop() is guaranteed to exist after this method returns,
// but the connection may not be open yet. |callback| specifies callback
// object for the client and must not be NULL.
- // TODO(sergeyu): Replace password with a token.
- void Init(const std::string& username, const std::string& password,
- Callback* callback);
+ void Init(const std::string& username, const std::string& auth_token,
+ const std::string& auth_token_service, Callback* callback);
// Creates new JingleChannel connected to the host with the specified jid.
// The result is returned immediately but the channel fails if the host
@@ -101,7 +104,9 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>,
void OnIncomingTunnel(cricket::TunnelSessionClient* client, buzz::Jid jid,
std::string description, cricket::Session* session);
- void DoInitialize();
+ void DoInitialize(const std::string& username,
+ const std::string& auth_token,
+ const std::string& auth_token_service);
// Used by Connect().
void DoConnect(ConnectRequest* request,
@@ -115,13 +120,15 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>,
// the jingle thread.
void UpdateState(State new_state);
+ buzz::PreXmppAuth* CreatePreXmppAuth(
+ const buzz::XmppClientSettings& settings);
+
+
buzz::XmppClient* client_;
scoped_ptr<JingleThread> thread_;
State state_;
Callback* callback_;
- std::string username_;
- std::string password_;
Lock full_jid_lock_;
std::string full_jid_;
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/jingle_glue/jingle_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698