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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 if (!local_cert_.empty() && key_pair_.get()) { | 118 if (!local_cert_.empty() && key_pair_.get()) { |
119 std::string normalized_local_jid = NormalizeJid(local_jid); | 119 std::string normalized_local_jid = NormalizeJid(local_jid); |
120 std::string normalized_remote_jid = NormalizeJid(remote_jid); | 120 std::string normalized_remote_jid = NormalizeJid(remote_jid); |
121 | 121 |
122 if (token_validator_factory_) { | 122 if (token_validator_factory_) { |
123 return NegotiatingHostAuthenticator::CreateWithThirdPartyAuth( | 123 return NegotiatingHostAuthenticator::CreateWithThirdPartyAuth( |
124 normalized_local_jid, normalized_remote_jid, local_cert_, key_pair_, | 124 normalized_local_jid, normalized_remote_jid, local_cert_, key_pair_, |
125 token_validator_factory_); | 125 token_validator_factory_); |
126 } | 126 } |
127 | 127 |
128 return NegotiatingHostAuthenticator::CreateWithPin( | 128 return NegotiatingHostAuthenticator::CreateWithSharedSecret( |
129 normalized_local_jid, normalized_remote_jid, local_cert_, key_pair_, | 129 normalized_local_jid, normalized_remote_jid, local_cert_, key_pair_, |
130 pin_hash_, pairing_registry_); | 130 pin_hash_, pairing_registry_); |
131 } | 131 } |
132 | 132 |
133 return make_scoped_ptr( | 133 return make_scoped_ptr( |
134 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); | 134 new RejectingAuthenticator(Authenticator::INVALID_CREDENTIALS)); |
135 } | 135 } |
136 | 136 |
137 } // namespace protocol | 137 } // namespace protocol |
138 } // namespace remoting | 138 } // namespace remoting |
OLD | NEW |