OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/protocol/pairing_client_authenticator.h" | 5 #include "remoting/protocol/pairing_client_authenticator.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "remoting/base/constants.h" | 9 #include "remoting/base/constants.h" |
10 #include "remoting/protocol/auth_util.h" | 10 #include "remoting/protocol/auth_util.h" |
11 #include "remoting/protocol/channel_authenticator.h" | 11 #include "remoting/protocol/channel_authenticator.h" |
12 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 12 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
13 | 13 |
14 namespace remoting { | 14 namespace remoting { |
15 namespace protocol { | 15 namespace protocol { |
16 | 16 |
17 PairingClientAuthenticator::PairingClientAuthenticator( | 17 PairingClientAuthenticator::PairingClientAuthenticator( |
18 const ClientAuthenticationConfig& client_auth_config, | 18 const ClientAuthenticationConfig& client_auth_config, |
19 const CreateBaseAuthenticatorCallback& create_base_authenticator_callback) | 19 const CreateBaseAuthenticatorCallback& create_base_authenticator_callback) |
20 : client_auth_config_(client_auth_config), | 20 : client_auth_config_(client_auth_config), |
21 create_base_authenticator_callback_(create_base_authenticator_callback), | 21 create_base_authenticator_callback_(create_base_authenticator_callback), |
22 weak_factory_(this) {} | 22 weak_factory_(this) {} |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 DCHECK(waiting_for_pin_); | 71 DCHECK(waiting_for_pin_); |
72 DCHECK(!spake2_authenticator_); | 72 DCHECK(!spake2_authenticator_); |
73 waiting_for_pin_ = false; | 73 waiting_for_pin_ = false; |
74 spake2_authenticator_ = create_base_authenticator_callback_.Run( | 74 spake2_authenticator_ = create_base_authenticator_callback_.Run( |
75 GetSharedSecretHash(client_auth_config_.host_id, pin), initial_state); | 75 GetSharedSecretHash(client_auth_config_.host_id, pin), initial_state); |
76 resume_callback.Run(); | 76 resume_callback.Run(); |
77 } | 77 } |
78 | 78 |
79 } // namespace protocol | 79 } // namespace protocol |
80 } // namespace remoting | 80 } // namespace remoting |
OLD | NEW |