| Index: remoting/host/chromoting_host.cc
|
| diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
|
| index c6485779d4b0a86aad1e02217653900f07e8b837..032e86bf703271d16ecd642e5e9ca4f735fcda05 100644
|
| --- a/remoting/host/chromoting_host.cc
|
| +++ b/remoting/host/chromoting_host.cc
|
| @@ -28,6 +28,7 @@
|
| #include "remoting/protocol/input_stub.h"
|
| #include "remoting/protocol/jingle_session_manager.h"
|
| #include "remoting/protocol/session_config.h"
|
| +#include "remoting/protocol/simple_host_authenticator.h"
|
|
|
| using remoting::protocol::ConnectionToClient;
|
| using remoting::protocol::InputStub;
|
| @@ -208,6 +209,14 @@ void ChromotingHost::OnSessionAuthenticated(ClientSession* client) {
|
| desktop_environment_->OnConnect(username);
|
| }
|
|
|
| +void ChromotingHost::OnSessionAuthenticationFailed(ClientSession* client) {
|
| + // Notify observers.
|
| + for (StatusObserverList::iterator it = status_observers_.begin();
|
| + it != status_observers_.end(); ++it) {
|
| + (*it)->OnAccessDenied();
|
| + }
|
| +}
|
| +
|
| void ChromotingHost::OnSessionClosed(ClientSession* client) {
|
| DCHECK(context_->network_message_loop()->BelongsToCurrentThread());
|
|
|
| @@ -306,8 +315,7 @@ void ChromotingHost::OnIncomingSession(
|
| }
|
|
|
| // Check that the client has access to the host.
|
| - if (!access_verifier_->VerifyPermissions(session->jid(),
|
| - session->initiator_token())) {
|
| + if (!access_verifier_->VerifyPermissions(session->jid())) {
|
| *response = protocol::SessionManager::DECLINE;
|
|
|
| // Notify observers.
|
| @@ -343,9 +351,6 @@ void ChromotingHost::OnIncomingSession(
|
| }
|
|
|
| session->set_config(config);
|
| - session->set_receiver_token(
|
| - GenerateHostAuthToken(session->initiator_token()));
|
| -
|
| // Provide the Access Code as shared secret for SSL channel authentication.
|
| session->set_shared_secret(access_code_);
|
|
|
| @@ -418,12 +423,6 @@ Encoder* ChromotingHost::CreateEncoder(const protocol::SessionConfig& config) {
|
| return NULL;
|
| }
|
|
|
| -std::string ChromotingHost::GenerateHostAuthToken(
|
| - const std::string& encoded_client_token) {
|
| - // TODO(ajwong): Return the signature of this instead.
|
| - return encoded_client_token;
|
| -}
|
| -
|
| int ChromotingHost::AuthenticatedClientsCount() const {
|
| DCHECK(context_->network_message_loop()->BelongsToCurrentThread());
|
|
|
|
|