Final Project Implementation of Basic Authentication
Developers GirijaSujathaPremalatha
Definition of Authentication Authentication is the process of determining whether someone or something is, in fact, who or what it is declared to be Authentication is the process of determining whether someone or something is, in fact, who or what it is declared to be
Modules File Management and Handling the Database File Management and Handling the Database Edit Users and Programs Edit Users and Programs Change Password and Delete User Account from.htpasswd and Database Change Password and Delete User Account from.htpasswd and Database
Project Description Design and implement a new web module, which allows an admin to manage users - issuing them accounts, edit, and delete them, while providing the user the ability to change their password. Design and implement a new web module, which allows an admin to manage users - issuing them accounts, edit, and delete them, while providing the user the ability to change their password.
The admin chooses the staff's from the database list and can multiple-select programs (from the database), from which they may belong to. The admin chooses the staff's from the database list and can multiple-select programs (from the database), from which they may belong to.
Code for verifying username and password Code for verifying username and password if ( $userlist{$username} eq crypt($password,$userlist{$username})) if ( $userlist{$username} eq crypt($password,$userlist{$username})) { Print “Successfully Logged in”; Print “Successfully Logged in”; }
Code for saving new password in.htpasswd Code for saving new password in.htpasswd if ( ($userlist{$username} eq crypt($oldpassword,$userlist{$username}) ) { if ( ($userlist{$username} eq crypt($oldpassword,$userlist{$username}) ) { $userlist{$username} = crypt($newpassword,"giri"); $userlist{$username} = crypt($newpassword,"giri"); &save_passwd_to_file; &save_passwd_to_file; }&save_passwd_to_file foreach (keys(%userlist)) { print OUT "$_:$userlist{$_}\n"; print OUT "$_:$userlist{$_}\n"; }
Admin Page
User Page
Difficulties Faced Sending to the recipient address Sending to the recipient address Passing variable from one file to another file Passing variable from one file to another file Dealing with password encryption. Dealing with password encryption.
What we have Learnt Learned to use sql in perl cgi programs Learned to use sql in perl cgi programs Became familiar with Html and mysql Became familiar with Html and mysql Learned to pass variables from one file to another. Learned to pass variables from one file to another. Learned to use subroutines. Learned to use subroutines.
Admin Flow Chart Admin Create User Account Managing the files Edit and Delete User account
User Flow Chart User Change Password
Overview Files we used for this Project are as follows: Finalproject.cgi-creates mainpage for Admin Finalproject.cgi-creates mainpage for Admin ject.cgi ject.cgi ject.cgi ject.cgi
Create.cgi-It creates new user and saves the username and encrypted password in.htpasswd file.It will send the username and password to the user’s . Create.cgi-It creates new user and saves the username and encrypted password in.htpasswd file.It will send the username and password to the user’s . Password = welcome
login.cgi-It allows user to login after checking username and password. login.cgi-It allows user to login after checking username and password changepass.cgi-It allows user to change the password. changepass.cgi-It allows user to change the password. pass.cgi pass.cgi pass.cgi pass.cgi
edit .cgi-it gets valid username to edit their s. edit .cgi-it gets valid username to edit their s. il.cgi il.cgi il.cgi il.cgi new .cgi-It gets the new to be edited. new .cgi-It gets the new to be edited. il.cgi il.cgi il.cgi il.cgi
update .cgi-It updates new in database. [Tablename:gen19_userinfo] update .cgi-It updates new in database. [Tablename:gen19_userinfo] mail.cgi mail.cgi mail.cgi mail.cgi editprogram.cgi-it gets valid username to edit their programs. editprogram.cgi-it gets valid username to edit their programs. ram.cgi ram.cgi ram.cgi ram.cgi
newprogram.cgi-It gets the new program to be edited. newprogram.cgi-It gets the new program to be edited. gram.cgi gram.cgi gram.cgi gram.cgi updateprogram.cgi-It updates new program in database. [Tablename:gen19_userinfo] updateprogram.cgi-It updates new program in database. [Tablename:gen19_userinfo] rogram.cgi rogram.cgi rogram.cgi rogram.cgi
delete.cgi-It deletes the record from database and.htpasswd file. delete.cgi-It deletes the record from database and.htpasswd file. gi gi gi gi
Thank You Many thanks to Prof Jon Degallier for helping us with our learning process. Many thanks to Prof Jon Degallier for helping us with our learning process. The Discussion Board is very useful to help each other. We really appreciate it and thanks to all. The Discussion Board is very useful to help each other. We really appreciate it and thanks to all.