| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 // Session is rejected. | 59 // Session is rejected. |
| 60 REJECTED, | 60 REJECTED, |
| 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 PROTOCOL_ERROR, | 69 PROTOCOL_ERROR, |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 // Callback used for layered Authenticator implementations, particularly | 72 // Callback used for layered Authenticator implementations, particularly |
| 72 // third-party and pairing authenticators. They use this callback to create | 73 // third-party and pairing authenticators. They use this callback to create |
| 73 // base SPAKE2 authenticators. | 74 // base SPAKE2 authenticators. |
| 74 typedef base::Callback<std::unique_ptr<Authenticator>( | 75 typedef base::Callback<std::unique_ptr<Authenticator>( |
| 75 const std::string& shared_secret, | 76 const std::string& shared_secret, |
| 76 Authenticator::State initial_state)> | 77 Authenticator::State initial_state)> |
| 77 CreateBaseAuthenticatorCallback; | 78 CreateBaseAuthenticatorCallback; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // for the result of this method. | 139 // for the result of this method. |
| 139 virtual std::unique_ptr<Authenticator> CreateAuthenticator( | 140 virtual std::unique_ptr<Authenticator> CreateAuthenticator( |
| 140 const std::string& local_jid, | 141 const std::string& local_jid, |
| 141 const std::string& remote_jid) = 0; | 142 const std::string& remote_jid) = 0; |
| 142 }; | 143 }; |
| 143 | 144 |
| 144 } // namespace protocol | 145 } // namespace protocol |
| 145 } // namespace remoting | 146 } // namespace remoting |
| 146 | 147 |
| 147 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_ | 148 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_ |
| OLD | NEW |