Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_USER_AUTH_PAM_H_ | |
| 6 #define REMOTING_HOST_USER_AUTH_PAM_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/scoped_ptr.h" | |
| 12 | |
| 13 namespace remoting { | |
| 14 | |
| 15 class UserAuthPamPimpl; | |
| 16 | |
| 17 // Class to perform a single PAM user authentication. | |
| 18 // This object wraps a single PAM handle, so a separate instance should be | |
| 19 // used for each authentication sequence (pam_start..pam_end). | |
| 20 // | |
| 21 // TODO(lambroslambrou): As pam_authenticate() can be blocking, this needs to | |
| 22 // expose an asynchronous API, with pam_authenticate() called in a background | |
| 23 // thread. | |
| 24 class UserAuthPam { | |
| 25 public: | |
| 26 UserAuthPam(); | |
| 27 ~UserAuthPam(); | |
| 28 bool Authenticate(const std::string& username, | |
| 29 const std::string& password); | |
| 30 private: | |
|
Sergey Ulanov
2011/02/10 20:14:28
nit: empty line before private:
| |
| 31 friend class UserAuthPamPimpl; | |
| 32 scoped_ptr<UserAuthPamPimpl> pimpl_; | |
| 33 DISALLOW_COPY_AND_ASSIGN(UserAuthPam); | |
|
Sergey Ulanov
2011/02/10 20:14:28
nit: Empty line before this one
| |
| 34 }; | |
| 35 | |
| 36 } // namespace remoting | |
| 37 | |
| 38 #endif // REMOTING_HOST_USER_AUTH_PAM_H_ | |
| OLD | NEW |