diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-29 20:19:59 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-29 20:19:59 +0000 |
commit | 1f249e24c736c7e8a330567b1403d8893f57ea49 (patch) | |
tree | 6feaa0669f1d1f0f2c6071a4cb66ee799015db46 /remoting/protocol/jingle_session.cc | |
parent | 72851a9a7d4f40ae41d26ac1a94f02544ac495be (diff) | |
download | chromium_src-1f249e24c736c7e8a330567b1403d8893f57ea49.zip chromium_src-1f249e24c736c7e8a330567b1403d8893f57ea49.tar.gz chromium_src-1f249e24c736c7e8a330567b1403d8893f57ea49.tar.bz2 |
Remove AccessVerifier interface.
AccessVerifier will be replaced with the new
protocol::Authenticator interface. This also changes behavior
of Session interface when session is rejected due to bad
auth: now the session is first accepted by ChromotingHost
but then goes to FAILED state with the new
AUTHENTICATION_FAILED error. Temporarily auth token is
verified in JingleSession::AcceptConnection(). Later
Authenticator implementation will be used instead.
BUG=105214
Review URL: http://codereview.chromium.org/8662001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112009 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/jingle_session.cc')
-rw-r--r-- | remoting/protocol/jingle_session.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc index ef0dfad..b008bb4a 100644 --- a/remoting/protocol/jingle_session.cc +++ b/remoting/protocol/jingle_session.cc @@ -14,6 +14,7 @@ #include "net/base/net_errors.h" #include "net/socket/stream_socket.h" #include "remoting/base/constants.h" +#include "remoting/protocol/auth_util.h" #include "remoting/protocol/jingle_datagram_connector.h" #include "remoting/protocol/jingle_session_manager.h" #include "remoting/protocol/jingle_stream_connector.h" @@ -99,6 +100,7 @@ void JingleSession::CloseInternal(int result, Error error) { reason = cricket::STR_TERMINATE_SUCCESS; break; case SESSION_REJECTED: + case AUTHENTICATION_FAILED: reason = cricket::STR_TERMINATE_DECLINE; break; case INCOMPATIBLE_PROTOCOL: @@ -395,6 +397,9 @@ void JingleSession::AcceptConnection() { delete this; return; } + + if (!VerifySupportAuthToken(jid_, shared_secret_, initiator_token())) + CloseInternal(net::ERR_CONNECTION_FAILED, AUTHENTICATION_FAILED); } void JingleSession::AddChannelConnector( |