Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Side by Side Diff: remoting/host/self_access_verifier.h

Issue 8662001: Remove AccessVerifier interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/self_access_verifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_SELF_ACCESS_VERIFIER_H_
6 #define REMOTING_HOST_SELF_ACCESS_VERIFIER_H_
7
8 #include "remoting/host/access_verifier.h"
9
10 #include "base/compiler_specific.h"
11
12 namespace remoting {
13
14 class HostConfig;
15
16 namespace protocol {
17 class ClientAuthToken;
18 } // namespace protocol
19
20 // SelfAccessVerifier is used by to verify that the client has access
21 // to the host in the Me2Me scenario. Currently it
22 //
23 // 1) Checks that host and client have the same bare JID.
24 // 2) Verifies that the access token can be decoded.
25 //
26 // TODO(sergeyu): Remove the bare-JID check, and instead ask the directory to
27 // perform user authorization.
28 class SelfAccessVerifier : public AccessVerifier {
29 public:
30 SelfAccessVerifier();
31 virtual ~SelfAccessVerifier();
32
33 bool Init(HostConfig* config);
34
35 // AccessVerifier interface.
36 virtual bool VerifyPermissions(
37 const std::string& client_jid,
38 const std::string& encoded_client_token) OVERRIDE;
39
40 private:
41 bool DecodeClientAuthToken(const std::string& encoded_client_token,
42 protocol::ClientAuthToken* client_token);
43
44 std::string host_jid_prefix_;
45 bool initialized_;
46
47 DISALLOW_COPY_AND_ASSIGN(SelfAccessVerifier);
48 };
49
50 } // namespace remoting
51
52 #endif // REMOTING_HOST_SELF_ACCESS_VERIFIER_H_
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/self_access_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698