]> mj.ucw.cz Git - subauth.git/blobdiff - server/subauthd.h
Bits of support of temporary tokens
[subauth.git] / server / subauthd.h
index 4fb665039c5beea8e195a057fa0fba3677a7acbe..f676b5edcc8ec400bd54de21fbd3700479867c7b 100644 (file)
@@ -27,6 +27,7 @@ struct client {
 
 extern clist zone_list;                        // of struct auth_zone
 extern char *database_name;
+extern char *temp_key_file;
 
 /* cmd.c */
 
@@ -53,6 +54,7 @@ struct auth_zone {
   uint auto_create_acct;
   uint allow_passwd;
   uint allow_tokens;
+  uint max_temp_validity;
 };
 
 struct auth_user {
@@ -102,3 +104,9 @@ char *auth_set_token_generated(struct auth_token *at, const char *comment);
 bool auth_check_token(struct auth_token *at, const char *passwd);
 
 extern struct auth_token *auth_fake_token;
+
+/* temp.c */
+
+void temp_init(void);
+char *temp_generate(const char *zone, const char *login, uint validity);
+const char *temp_check(const char *zone, const char *login, const char *token);