2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2004 Net Integration Technologies, Inc.
5 * A WvStream that authenticates with PAM. If WvStreams is compiled without
6 * PAM, it just fails. Note that if you don't check isok, you can still read
7 * and write to the stream - in particular, anything written in the
8 * constructor will go through before authentication begins.
10 * For now, this only works for PAM modules that don't require any user
11 * interaction (not even a password!), such as ssoya.
16 #include "wvstringlist.h"
30 * Log the result of the last PAM step, based on the pam_status flag,and
31 * write a failure message to the cloned stream on error. step is the
32 * name to use in the log message. Returns true if the last step
33 * succeeded, false if it failed.
35 bool check_pam_status(WvStringParm step
);
39 * Start up PAM (presumably you will want to call authenticate()
42 WvPam(WvStringParm svcname
);
45 * Start up PAM, and authenticate user from rhost with password
47 WvPam(WvStringParm svcname
, WvStringParm rhost
,
48 WvStringParm user
= WvString::null
,
49 WvStringParm password
= WvString::null
);
54 * Authenticate the user from rhost with password.
56 bool authenticate(WvStringParm rhost
= WvString::null
,
57 WvStringParm user
= WvString::null
,
58 WvStringParm password
= WvString::null
);
61 * Get the groups that the currently sessioned user is logged
64 void getgroups(WvStringList
&groups
) const;
69 WvString
getuser() const;
72 * Check here to see if the user is validated or not