OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef REMOTING_HOST_USER_AUTHENTICATOR_H_ |
| 6 #define REMOTING_HOST_USER_AUTHENTICATOR_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 namespace remoting { |
| 11 |
| 12 // Interface for authenticating users for access to remote desktop session. |
| 13 // Implementation is platform-specific. |
| 14 // Implementations may assume each instance of this class handles only a |
| 15 // single Authenticate request. |
| 16 // TODO(lambroslambrou): Decide whether this needs an asychronous interface |
| 17 // (for example AuthenticateStart()..AuthenticateEndCallback()), or whether the |
| 18 // multi-threading policy could be handled by the caller. |
| 19 class UserAuthenticator { |
| 20 public: |
| 21 virtual ~UserAuthenticator() {} |
| 22 |
| 23 // Authenticate a user, returning true if the username/password are valid. |
| 24 virtual bool Authenticate(const std::string& username, |
| 25 const std::string& password) = 0; |
| 26 }; |
| 27 |
| 28 } // namespace remoting |
| 29 |
| 30 #endif // REMOTING_HOST_USER_AUTHENTICATOR_H_ |
OLD | NEW |