Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / remoting / host / pam_authorization_factory_posix.h
blob2a084a6b46a464e3d766a924359f9e179abc1a32
1 // Copyright (c) 2012 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.
5 #ifndef REMOTING_HOST_PAM_AUTHORIZATION_FACTORY_POSIX_H_
6 #define REMOTING_HOST_PAM_AUTHORIZATION_FACTORY_POSIX_H_
8 #include "remoting/protocol/authenticator.h"
10 #include "base/memory/scoped_ptr.h"
12 // PamAuthorizationFactory abuses the AuthenticatorFactory interface to apply
13 // PAM-based authorization on top of some underlying authentication scheme.
15 namespace remoting {
17 class PamAuthorizationFactory : public protocol::AuthenticatorFactory {
18 public:
19 PamAuthorizationFactory(
20 scoped_ptr<protocol::AuthenticatorFactory> underlying);
21 ~PamAuthorizationFactory() override;
23 scoped_ptr<protocol::Authenticator> CreateAuthenticator(
24 const std::string& local_jid,
25 const std::string& remote_jid,
26 const buzz::XmlElement* first_message) override;
28 private:
29 scoped_ptr<protocol::AuthenticatorFactory> underlying_;
32 } // namespace remoting
34 #endif