Add to git.
[monolith.git] / widgets / ml_login_nopw.h
1 /* Monolith login widget (email validation, no password).
2  * - by Richard W.M. Jones <rich@annexia.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  *
18  * $Id: ml_login_nopw.h,v 1.2 2003/02/22 15:34:33 rich Exp $
19  */
20
21 #ifndef ML_LOGIN_NOPW_H
22 #define ML_LOGIN_NOPW_H
23
24 #include <pool.h>
25
26 #include "monolith.h"
27
28 struct ml_login_nopw;
29 typedef struct ml_login_nopw *ml_login_nopw;
30
31 /* Function: new_ml_login_nopw - login widget (email validation, no password)
32  *
33  * Login widgets provide a place for users to login, logout and register
34  * for the service. This particular login widget uses only email validation,
35  * and doesn't require passwords (or onerous registration steps). A user
36  * will see a box inviting them to type their email address. A confirmation
37  * email is sent to the user containing a link which they click. This
38  * authenticates them to the site, at which point they are logged in.
39  * Logged in users are shown a logout button.
40  *
41  * The @code{ml_login_nopw} widget requires the user tables, from
42  * @code{sql/monolith_users_create.sql}.
43  *
44  * @code{new_ml_login_nopw} creates a new login
45  * widget. @code{conninfo} should point to the PostgreSQL database
46  * configured with the user tables.
47  */
48 extern ml_login_nopw new_ml_login_nopw (pool pool, ml_session session, const char *conninfo);
49
50 #endif /* ML_LOGIN_NOPW_H */