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