| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_PAM_AUTHORIZATION_FACTORY_POSIX_H_ | 5 #ifndef REMOTING_HOST_PAM_AUTHORIZATION_FACTORY_POSIX_H_ |
| 6 #define REMOTING_HOST_PAM_AUTHORIZATION_FACTORY_POSIX_H_ | 6 #define REMOTING_HOST_PAM_AUTHORIZATION_FACTORY_POSIX_H_ |
| 7 | 7 |
| 8 #include "remoting/protocol/authenticator.h" | 8 #include "remoting/protocol/authenticator.h" |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 | 11 |
| 12 // PamAuthorizationFactory abuses the AuthenticatorFactory interface to apply | 12 // PamAuthorizationFactory abuses the AuthenticatorFactory interface to apply |
| 13 // PAM-based authorization on top of some underlying authentication scheme. | 13 // PAM-based authorization on top of some underlying authentication scheme. |
| 14 | 14 |
| 15 namespace remoting { | 15 namespace remoting { |
| 16 | 16 |
| 17 class PamAuthorizationFactory : public protocol::AuthenticatorFactory { | 17 class PamAuthorizationFactory : public protocol::AuthenticatorFactory { |
| 18 public: | 18 public: |
| 19 PamAuthorizationFactory( | 19 PamAuthorizationFactory( |
| 20 scoped_ptr<protocol::AuthenticatorFactory> underlying); | 20 scoped_ptr<protocol::AuthenticatorFactory> underlying); |
| 21 ~PamAuthorizationFactory() override; | 21 ~PamAuthorizationFactory() override; |
| 22 | 22 |
| 23 scoped_ptr<protocol::Authenticator> CreateAuthenticator( | 23 scoped_ptr<protocol::Authenticator> CreateAuthenticator( |
| 24 const std::string& local_jid, | 24 const std::string& local_jid, |
| 25 const std::string& remote_jid, | 25 const std::string& remote_jid) override; |
| 26 const buzz::XmlElement* first_message) override; | |
| 27 | 26 |
| 28 private: | 27 private: |
| 29 scoped_ptr<protocol::AuthenticatorFactory> underlying_; | 28 scoped_ptr<protocol::AuthenticatorFactory> underlying_; |
| 30 }; | 29 }; |
| 31 | 30 |
| 32 } // namespace remoting | 31 } // namespace remoting |
| 33 | 32 |
| 34 #endif | 33 #endif |
| OLD | NEW |