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 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_H_ |
6 #define REMOTING_PROTOCOL_AUTHENTICATOR_H_ | 6 #define REMOTING_PROTOCOL_AUTHENTICATOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 // Asynchronously processing the last message from the peer. | 62 // Asynchronously processing the last message from the peer. |
63 PROCESSING_MESSAGE, | 63 PROCESSING_MESSAGE, |
64 }; | 64 }; |
65 | 65 |
66 enum RejectionReason { | 66 enum RejectionReason { |
67 INVALID_CREDENTIALS, | 67 INVALID_CREDENTIALS, |
68 INVALID_ACCOUNT, | 68 INVALID_ACCOUNT, |
69 PROTOCOL_ERROR, | 69 PROTOCOL_ERROR, |
70 REJECTED_BY_USER, | 70 REJECTED_BY_USER, |
| 71 TOO_MANY_CONNECTIONS, |
71 }; | 72 }; |
72 | 73 |
73 // Callback used for layered Authenticator implementations, particularly | 74 // Callback used for layered Authenticator implementations, particularly |
74 // third-party and pairing authenticators. They use this callback to create | 75 // third-party and pairing authenticators. They use this callback to create |
75 // base SPAKE2 authenticators. | 76 // base SPAKE2 authenticators. |
76 typedef base::Callback<std::unique_ptr<Authenticator>( | 77 typedef base::Callback<std::unique_ptr<Authenticator>( |
77 const std::string& shared_secret, | 78 const std::string& shared_secret, |
78 Authenticator::State initial_state)> | 79 Authenticator::State initial_state)> |
79 CreateBaseAuthenticatorCallback; | 80 CreateBaseAuthenticatorCallback; |
80 | 81 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // for the result of this method. | 141 // for the result of this method. |
141 virtual std::unique_ptr<Authenticator> CreateAuthenticator( | 142 virtual std::unique_ptr<Authenticator> CreateAuthenticator( |
142 const std::string& local_jid, | 143 const std::string& local_jid, |
143 const std::string& remote_jid) = 0; | 144 const std::string& remote_jid) = 0; |
144 }; | 145 }; |
145 | 146 |
146 } // namespace protocol | 147 } // namespace protocol |
147 } // namespace remoting | 148 } // namespace remoting |
148 | 149 |
149 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_ | 150 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_ |
OLD | NEW |