cctools
auth.h
1 /*
2 Copyright (C) 2003-2004 Douglas Thain and the University of Wisconsin
3 Copyright (C) 2005- The University of Notre Dame
4 This software is distributed under the GNU General Public License.
5 See the file COPYING for details.
6 */
7 
8 #ifndef AUTH_H
9 #define AUTH_H
10 
11 #include "link.h"
12 
13 #define AUTH_SUBJECT_MAX 1024
14 #define AUTH_TYPE_MAX 1024
15 #define AUTH_LINE_MAX (AUTH_SUBJECT_MAX+AUTH_TYPE_MAX)
16 
17 typedef int (*auth_assert_t) (struct link * l, time_t stoptime);
18 typedef int (*auth_accept_t) (struct link * l, char **subject, time_t stoptime);
19 
20 int auth_assert(struct link *l, char **type, char **subject, time_t stoptime);
21 int auth_accept(struct link *l, char **type, char **subject, time_t stoptime);
22 
23 int auth_barrier(struct link *l, const char *response, time_t stoptime);
24 int auth_register(char *type, auth_assert_t assert, auth_accept_t accept);
25 
26 void auth_clear(void);
27 
28 #endif