auth.h
00001
00002
00003
00004
00005
00006
00007
00008 #ifndef AUTH_H
00009 #define AUTH_H
00010
00011 #include "link.h"
00012
00013 struct auth_state;
00014
00015 #define AUTH_SUBJECT_MAX 1024
00016 #define AUTH_TYPE_MAX 1024
00017 #define AUTH_LINE_MAX (AUTH_SUBJECT_MAX+AUTH_TYPE_MAX)
00018
00019 typedef int (*auth_assert_t) (struct link * l, time_t stoptime);
00020 typedef int (*auth_accept_t) (struct link * l, char **subject, time_t stoptime);
00021
00022 int auth_assert(struct link *l, char **type, char **subject, time_t stoptime);
00023 int auth_accept(struct link *l, char **type, char **subject, time_t stoptime);
00024
00025 int auth_barrier(struct link *l, const char *response, time_t stoptime);
00026 int auth_register(char *type, auth_assert_t assert, auth_accept_t accept);
00027
00028 void auth_clear(void);
00029
00030 struct auth_state *auth_clone(void);
00031 void auth_replace(struct auth_state *);
00032
00033 #endif