OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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_ACCESS_VERIFIER_H_ |
| 6 #define REMOTING_HOST_ACCESS_VERIFIER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 |
| 12 namespace remoting { |
| 13 |
| 14 class HostConfig; |
| 15 |
| 16 // AccessVerifier is used by to verify that the client has access to the host. |
| 17 // Currently it just checks that host and client have the same bare JID. |
| 18 // |
| 19 // TODO(sergeyu): AccessVerifier should query directory to verify user |
| 20 // permissions. |
| 21 class AccessVerifier { |
| 22 public: |
| 23 AccessVerifier(); |
| 24 bool Init(HostConfig* config); |
| 25 bool VerifyPermissions(const std::string& client_jid); |
| 26 |
| 27 private: |
| 28 std::string host_jid_prefix_; |
| 29 bool initialized_; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(AccessVerifier); |
| 32 }; |
| 33 |
| 34 } // namespace remoting |
| 35 |
| 36 #endif // REMOTING_HOST_ACCESS_VERIFIER_H_ |
OLD | NEW |