source: trunk/gsdl/src/recpt/authenaction.h@ 368

Last change on this file since 368 was 363, checked in by rjmcnab, 25 years ago

Initial revision.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/**********************************************************************
2 *
3 * authenaction.h -- authenticating users
4 * Copyright (C) 1999 DigiLib Systems Limited, New Zealand
5 *
6 * PUT COPYRIGHT NOTICE HERE
7 *
8 * $Id: authenaction.h 363 1999-07-10 22:19:29Z rjmcnab $
9 *
10 *********************************************************************/
11
12
13#ifndef AUTHENACTION_H
14#define AUTHENACTION_H
15
16#include "gsdlconf.h"
17#include "action.h"
18#include "text_t.h"
19
20
21// information about a single user
22struct userinfo_t {
23 void clear ();
24 userinfo_t () {clear();}
25
26 enum status_t {enabled, disabled, invalid};
27
28 text_t username;
29 text_t password;
30 status_t status;
31 text_t groups; // comma separated list
32};
33
34// information about all the users
35typedef map<text_t, userinfo_t, lttext_t> userinfo_tmap;
36
37
38
39class authenaction : public action {
40protected:
41 text_t passwdfile;
42 userinfo_tmap userinfo;
43
44public:
45 authenaction ();
46 virtual ~authenaction () {}
47
48 void configure (const text_t &key, const text_tarray &cfgline);
49 bool init (ostream &logout);
50
51 text_t get_action_name () {return "a";}
52
53 bool check_cgiargs (cgiargsinfoclass &argsinfo, cgiargsclass &args,
54 ostream &logout);
55 bool check_external_cgiargs (cgiargsinfoclass &argsinfo,
56 cgiargsclass &args,
57 outconvertclass &outconvert,
58 const text_t &saveconf,
59 ostream &logout);
60
61 void get_cgihead_info (cgiargsclass &args, response_t &response,
62 text_t &response_data, ostream &logout);
63
64 void define_internal_macros (displayclass &disp, cgiargsclass &args,
65 recptproto *collectproto, ostream &logout);
66 void define_external_macros (displayclass &disp, cgiargsclass &args,
67 recptproto *collectproto, ostream &logout);
68
69 bool do_action (cgiargsclass &args, recptproto *collectproto,
70 displayclass &disp, outconvertclass &outconvert,
71 ostream &textout, ostream &logout);
72};
73
74
75#endif
Note: See TracBrowser for help on using the repository browser.