OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/me2me_host_authenticator_factory.h" | 5 #include "remoting/protocol/me2me_host_authenticator_factory.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 LOG(ERROR) << "Rejecting incoming connection from " << remote_jid | 112 LOG(ERROR) << "Rejecting incoming connection from " << remote_jid |
113 << ": Domain mismatch."; | 113 << ": Domain mismatch."; |
114 return make_scoped_ptr( | 114 return make_scoped_ptr( |
115 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); | 115 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 if (!local_cert_.empty() && key_pair_.get()) { | 119 if (!local_cert_.empty() && key_pair_.get()) { |
120 if (token_validator_factory_) { | 120 if (token_validator_factory_) { |
121 return NegotiatingHostAuthenticator::CreateWithThirdPartyAuth( | 121 return NegotiatingHostAuthenticator::CreateWithThirdPartyAuth( |
122 local_cert_, key_pair_, | 122 local_jid, remote_jid, local_cert_, key_pair_, |
123 token_validator_factory_->CreateTokenValidator( | 123 token_validator_factory_->CreateTokenValidator(local_jid, |
124 local_jid, remote_jid)); | 124 remote_jid)); |
125 } | 125 } |
126 | 126 |
127 return NegotiatingHostAuthenticator::CreateWithPin( | 127 return NegotiatingHostAuthenticator::CreateWithPin( |
128 local_cert_, key_pair_, pin_hash_, pairing_registry_); | 128 local_jid, remote_jid, local_cert_, key_pair_, pin_hash_, |
| 129 pairing_registry_); |
129 } | 130 } |
130 | 131 |
131 return make_scoped_ptr( | 132 return make_scoped_ptr( |
132 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); | 133 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); |
133 } | 134 } |
134 | 135 |
135 } // namespace protocol | 136 } // namespace protocol |
136 } // namespace remoting | 137 } // namespace remoting |
OLD | NEW |