1 |
/** |
2 |
* authcookie.h: Remote authentication ticket management. |
3 |
* |
4 |
* Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
5 |
* Rights to this code are as documented in COPYING. |
6 |
* |
7 |
* |
8 |
* Portions of this file were derived from sources bearing the following license: |
9 |
* Copyright © 2005 Atheme Development Group |
10 |
* Rights to this code are as documented in doc/pod/license.pod. |
11 |
* |
12 |
* $Id: authcookie.h,v 1.3 2007-08-28 17:08:06 pippijn Exp $ |
13 |
*/ |
14 |
|
15 |
#ifndef AUTHCOOKIE_H |
16 |
#define AUTHCOOKIE_H |
17 |
|
18 |
struct authcookie_t : zero_initialised |
19 |
{ |
20 |
char *ticket; |
21 |
myuser_t *myuser; |
22 |
time_t expire; |
23 |
node_t node; |
24 |
}; |
25 |
|
26 |
E void authcookie_init (void); |
27 |
E authcookie_t *authcookie_create (myuser_t *mu); |
28 |
E authcookie_t *authcookie_find (char *ticket, myuser_t *myuser); |
29 |
E void authcookie_destroy (authcookie_t *ac); |
30 |
E void authcookie_destroy_all (myuser_t *mu); |
31 |
E bool authcookie_validate (char *ticket, myuser_t *myuser); |
32 |
E void authcookie_expire (void *arg); |
33 |
|
34 |
#endif |