| 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/it2me_host_authenticator_factory.h" | 5 #include "remoting/protocol/it2me_host_authenticator_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "remoting/base/rsa_key_pair.h" | 9 #include "remoting/base/rsa_key_pair.h" |
| 10 #include "remoting/protocol/negotiating_host_authenticator.h" | 10 #include "remoting/protocol/negotiating_host_authenticator.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 if (!base::EndsWith(client_username, | 38 if (!base::EndsWith(client_username, |
| 39 std::string("@") + required_client_domain_, | 39 std::string("@") + required_client_domain_, |
| 40 base::CompareCase::INSENSITIVE_ASCII)) { | 40 base::CompareCase::INSENSITIVE_ASCII)) { |
| 41 LOG(ERROR) << "Rejecting incoming connection from " << remote_jid | 41 LOG(ERROR) << "Rejecting incoming connection from " << remote_jid |
| 42 << ": Domain mismatch."; | 42 << ": Domain mismatch."; |
| 43 return make_scoped_ptr( | 43 return make_scoped_ptr( |
| 44 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); | 44 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 return NegotiatingHostAuthenticator::CreateForIt2Me(local_cert_, key_pair_, | 48 return NegotiatingHostAuthenticator::CreateForIt2Me( |
| 49 access_code_); | 49 local_jid, remote_jid, local_cert_, key_pair_, access_code_); |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace protocol | 52 } // namespace protocol |
| 53 } // namespace remoting | 53 } // namespace remoting |
| OLD | NEW |