Index: remoting/protocol/session_manager.h |
diff --git a/remoting/protocol/session_manager.h b/remoting/protocol/session_manager.h |
index f36abd2b6f2229cc022e82615e6b881012c356ab..7a02c3da74645ebbb64a9e5e313ec312c5ebe0b7 100644 |
--- a/remoting/protocol/session_manager.h |
+++ b/remoting/protocol/session_manager.h |
@@ -52,16 +52,15 @@ |
#include "base/threading/non_thread_safe.h" |
#include "remoting/protocol/session.h" |
-namespace crypto { |
-class RSAPrivateKey; |
-} // namespace base |
- |
namespace remoting { |
class SignalStrategy; |
namespace protocol { |
+class Authenticator; |
+class AuthenticatorFactory; |
+ |
// Generic interface for Chromoting session manager. |
// |
// TODO(sergeyu): Split this into two separate interfaces: one for the |
@@ -113,8 +112,6 @@ class SessionManager : public base::NonThreadSafe { |
virtual void Init(const std::string& local_jid, |
SignalStrategy* signal_strategy, |
Listener* listener, |
- crypto::RSAPrivateKey* private_key, |
- const std::string& certificate, |
bool allow_nat_traversal) = 0; |
// Tries to create a session to the host |jid|. Must be called only |
@@ -123,15 +120,14 @@ class SessionManager : public base::NonThreadSafe { |
// |
// |host_jid| is the full jid of the host to connect to. |
// |host_public_key| is used to for authentication. |
- // |client_oauth_token| is a short-lived OAuth token identify the client. |
+ // |authenticator| is a client authenticator for the session. |
// |config| contains the session configurations that the client supports. |
// |state_change_callback| is called when the connection state changes. |
// |
// Ownership of the |config| is passed to the new session. |
virtual Session* Connect( |
const std::string& host_jid, |
- const std::string& host_public_key, |
- const std::string& client_token, |
+ Authenticator* authenticator, |
CandidateSessionConfig* config, |
const Session::StateChangeCallback& state_change_callback) = 0; |
@@ -140,6 +136,12 @@ class SessionManager : public base::NonThreadSafe { |
// returns. |
virtual void Close() = 0; |
+ // Set authenticator factory that should be used to authenticate |
+ // incoming connection. No connections will be accepted if |
+ // authenticator factory isn't set. |
+ virtual void set_authenticator_factory( |
+ AuthenticatorFactory* authenticator_factory) = 0; |
+ |
private: |
DISALLOW_COPY_AND_ASSIGN(SessionManager); |
}; |