WebcitAuth; Handles authentication of users to a Citadel server.
[Configuration Mechanisms]


Functions

void initialize_axdefs (void)
void display_login (char *mesg)
 Display the login screen.
void become_logged_in (char *user, char *pass, char *serv_response)
 Initialize the session This function needs to get called whenever the session changes from not-logged-in to logged-in, either by an explicit login by the user or by a timed-out session automatically re-establishing with a little help from the browser cookie. Either way, we need to load access controls and preferences from the server.
void do_login (void)
 Login Checks the logics to detect invalid passwords not to get on citservers nerves.
void do_welcome (void)
 display the user a welcome screen. if this is the first time login, and the web based setup is enabled, lead the user through the setup routines
void end_webcit_session (void)
void do_logout (void)
void validate (void)
void display_reg (int during_login)
 Display form for registration. (Set during_login to 1 if this registration is being performed during new user login and will require chaining to the proper screen.).
void display_changepw (void)
void changepw (void)
 change password if passwords match, propagate it to citserver.

Variables

char * axdefs [7]
 user states the plain text states of a user. filled in at \ function TODO initialize_ax_defs() due to NLS

Function Documentation

void initialize_axdefs ( void   ) 

0: an erased user

1: a new user

2: a trouble maker

3: user with normal privileges

4: a user that may access network resources

5: a moderator

6: chief

Definition at line 22 of file auth.c.

References axdefs.

Referenced by main().

void display_login ( char *  mesg  ) 

Display the login screen.

Parameters:
mesg The error message if last attempt failed.

Definition at line 39 of file auth.c.

References do_template(), offer_languages(), output_headers(), stresc(), svcallback(), svprintf(), wDumpContent(), and wprintf().

Referenced by do_login(), and session_loop().

void become_logged_in ( char *  user,
char *  pass,
char *  serv_response 
)

Initialize the session This function needs to get called whenever the session changes from not-logged-in to logged-in, either by an explicit login by the user or by a timed-out session automatically re-establishing with a little help from the browser cookie. Either way, we need to load access controls and preferences from the server.

Parameters:
user the username
pass his password
serv_response The parameters returned from a Citadel USER or NEWU command

Definition at line 106 of file auth.c.

References extract_int(), extract_token(), get_preference(), load_preferences(), safestrncpy(), serv_getln(), and serv_puts().

Referenced by do_login(), and session_loop().

void do_welcome ( void   ) 

display the user a welcome screen. if this is the first time login, and the web based setup is enabled, lead the user through the setup routines

Go to the user's preferred start page

Definition at line 205 of file auth.c.

References ctdlhost, ctdlport, get_preference(), http_redirect(), safestrncpy(), set_preference(), setup_wizard, and wizard_filename.

Referenced by display_reg(), do_login(), session_loop(), and submit_vcard().

void end_webcit_session ( void   ) 

Disconnect from the Citadel server, and end this WebCit session

Definition at line 262 of file auth.c.

References serv_puts(), and set_preference().

Referenced by do_listsub(), do_logout(), output_static(), and session_loop().

void do_logout ( void   ) 

execute the logout

Calling output_headers() this way causes the cookies to be un-set

Definition at line 279 of file auth.c.

References end_webcit_session(), fmout(), output_headers(), safestrncpy(), serv_getln(), serv_puts(), wDumpContent(), and wprintf().

Referenced by do_login(), and session_loop().

void validate ( void   ) 

If the user just submitted a validation, process it...

Now see if any more users require validation.

Definition at line 323 of file auth.c.

References axdefs, bstr(), output_headers(), safestrncpy(), serv_getln(), serv_printf(), serv_puts(), urlescputs(), wDumpContent(), and wprintf().

Referenced by session_loop().

void display_reg ( int  during_login  ) 

Display form for registration. (Set during_login to 1 if this registration is being performed during new user login and will require chaining to the proper screen.).

Parameters:
during_login are we just in the login phase?

Definition at line 426 of file auth.c.

References display_main_menu(), do_edit_vcard(), do_welcome(), goto_config_room(), and locate_user_vcard().

Referenced by do_login(), and session_loop().

void display_changepw ( void   ) 

display form for changing your password

Definition at line 458 of file auth.c.

References do_template(), fmout(), output_headers(), safestrncpy(), serv_getln(), serv_puts(), wDumpContent(), and wprintf().

Referenced by changepw(), and session_loop().


Generated on Wed Jun 20 23:13:12 2007 for webcit by  doxygen 1.5.2