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 #include "remoting/host/user_authenticator.h" | |
13 | |
14 namespace remoting { | |
15 | |
16 class UserAuthPamPimpl; | |
17 | |
18 // Class to perform a single PAM user authentication. | |
19 // This object wraps a single PAM handle, so a separate instance should be | |
20 // used for each authentication sequence (pam_start..pam_end). | |
21 // | |
22 // TODO(lambroslambrou): As pam_authenticate() can be blocking, this needs to | |
23 // expose an asynchronous API, with pam_authenticate() called in a background | |
24 // thread. | |
25 class UserAuthPam : public UserAuthenticator { | |
awong
2011/02/15 01:05:28
In one class, you use the "Auth" shorting, and in
| |
26 public: | |
27 UserAuthPam(); | |
28 virtual ~UserAuthPam(); | |
29 virtual bool Authenticate(const std::string& username, | |
30 const std::string& password); | |
31 | |
32 private: | |
33 friend class UserAuthPamPimpl; | |
awong
2011/02/15 01:05:28
Since this class is only for Pam, and we already h
| |
34 scoped_ptr<UserAuthPamPimpl> pimpl_; | |
35 | |
36 DISALLOW_COPY_AND_ASSIGN(UserAuthPam); | |
37 }; | |
38 | |
39 } // namespace remoting | |
40 | |
41 #endif // REMOTING_HOST_USER_AUTH_PAM_H_ | |
OLD | NEW |