diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 02:05:06 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 02:05:06 +0000 |
commit | 76451fe7fbce667742dff671cad06cbd039f8296 (patch) | |
tree | 0b2196989e5bb6643a026eb71964cbfaa2b66feb /remoting/host/access_verifier.h | |
parent | e8478ae4ef8bd1dbb83cd46e8af060d5331ba2df (diff) | |
download | chromium_src-76451fe7fbce667742dff671cad06cbd039f8296.zip chromium_src-76451fe7fbce667742dff671cad06cbd039f8296.tar.gz chromium_src-76451fe7fbce667742dff671cad06cbd039f8296.tar.bz2 |
Basic user access check for chromoting host.
BUG=53984
TEST=unittests
Review URL: http://codereview.chromium.org/3303001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58301 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/access_verifier.h')
-rw-r--r-- | remoting/host/access_verifier.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/remoting/host/access_verifier.h b/remoting/host/access_verifier.h new file mode 100644 index 0000000..41244ef --- /dev/null +++ b/remoting/host/access_verifier.h @@ -0,0 +1,36 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef REMOTING_HOST_ACCESS_VERIFIER_H_ +#define REMOTING_HOST_ACCESS_VERIFIER_H_ + +#include <string> + +#include "base/basictypes.h" + +namespace remoting { + +class HostConfig; + +// AccessVerifier is used by to verify that the client has access to the host. +// Currently it just checks that host and client have the same bare JID. +// +// TODO(sergeyu): AccessVerifier should query directory to verify user +// permissions. +class AccessVerifier { + public: + AccessVerifier(); + bool Init(HostConfig* config); + bool VerifyPermissions(const std::string& client_jid); + + private: + std::string host_jid_prefix_; + bool initialized_; + + DISALLOW_COPY_AND_ASSIGN(AccessVerifier); +}; + +} // namespace remoting + +#endif // REMOTING_HOST_ACCESS_VERIFIER_H_ |