OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_HOST_SUPPORT_ACCESS_VERIFIER_H_ | 5 #ifndef REMOTING_HOST_SUPPORT_ACCESS_VERIFIER_H_ |
6 #define REMOTING_HOST_SUPPORT_ACCESS_VERIFIER_H_ | 6 #define REMOTING_HOST_SUPPORT_ACCESS_VERIFIER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "remoting/host/access_verifier.h" | 10 #include "remoting/host/access_verifier.h" |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 | 13 |
14 namespace remoting { | 14 namespace remoting { |
15 | 15 |
16 class HostConfig; | |
17 | |
18 // SupportAccessVerifier is used in Me2Mom scenario to verify that the | 16 // SupportAccessVerifier is used in Me2Mom scenario to verify that the |
19 // client knows the host secret. | 17 // client knows the host secret. |
20 class SupportAccessVerifier : public AccessVerifier { | 18 class SupportAccessVerifier : public AccessVerifier { |
21 public: | 19 public: |
22 SupportAccessVerifier(); | 20 SupportAccessVerifier(); |
23 virtual ~SupportAccessVerifier(); | 21 virtual ~SupportAccessVerifier(); |
24 | 22 |
25 const std::string& host_secret() const { return host_secret_; } | 23 const std::string& host_secret() const { return host_secret_; } |
26 | 24 |
27 // AccessVerifier interface. | 25 // AccessVerifier interface. |
28 virtual bool VerifyPermissions( | 26 virtual bool VerifyPermissions( |
29 const std::string& client_jid, | 27 const std::string& client_jid, |
30 const std::string& encoded_client_token) OVERRIDE; | 28 const std::string& encoded_client_token) OVERRIDE; |
31 | 29 |
32 void OnIT2MeHostRegistered(bool successful, const std::string& support_id); | 30 void OnIT2MeHostRegistered(bool successful, const std::string& support_id); |
33 | 31 |
34 private: | 32 private: |
35 std::string host_secret_; | 33 std::string host_secret_; |
36 std::string support_id_; | 34 std::string support_id_; |
37 | 35 |
38 DISALLOW_COPY_AND_ASSIGN(SupportAccessVerifier); | 36 DISALLOW_COPY_AND_ASSIGN(SupportAccessVerifier); |
39 }; | 37 }; |
40 | 38 |
41 } // namespace remoting | 39 } // namespace remoting |
42 | 40 |
43 #endif // REMOTING_HOST_SUPPORT_ACCESS_VERIFIER_H_ | 41 #endif // REMOTING_HOST_SUPPORT_ACCESS_VERIFIER_H_ |
OLD | NEW |