Final Project Implementation of Basic Authentication.
-
Upload
philippa-oconnor -
Category
Documents
-
view
223 -
download
2
Transcript of Final Project Implementation of Basic Authentication.
![Page 1: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/1.jpg)
Final ProjectFinal Project
Implementation of Basic Implementation of Basic AuthenticationAuthentication
![Page 2: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/2.jpg)
DevelopersDevelopers
GirijaGirija
SujathaSujatha
PremalathaPremalatha
![Page 3: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/3.jpg)
Definition of AuthenticationDefinition of Authentication
Authentication is the process of Authentication is the process of determining whether someone or determining whether someone or
something is, in fact, who or what it something is, in fact, who or what it is declared to be is declared to be
![Page 4: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/4.jpg)
ModulesModules
File Management and Handling the File Management and Handling the DatabaseDatabase
Edit Users Email and ProgramsEdit Users Email and Programs Change Password and Delete User Change Password and Delete User
Account from .htpasswd and Account from .htpasswd and DatabaseDatabase
![Page 5: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/5.jpg)
Project DescriptionProject Description
Design and implement a new web Design and implement a new web module, which allows an admin to module, which allows an admin to manage users - issuing them manage users - issuing them accounts, edit, and delete them, accounts, edit, and delete them, while providing the user the ability to while providing the user the ability to change their password. change their password.
![Page 6: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/6.jpg)
The admin chooses the staff's email The admin chooses the staff's email from the database list and can from the database list and can
multiple-select programs (from the multiple-select programs (from the database), from which they may database), from which they may
belong to. belong to.
![Page 7: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/7.jpg)
Code for verifying username and Code for verifying username and passwordpassword
if ( $userlist{$username} eq if ( $userlist{$username} eq crypt($password,crypt($password,$userlist{$username}))$userlist{$username}))
{{
Print “Successfully Logged in”;Print “Successfully Logged in”;
}}
![Page 8: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/8.jpg)
Code for saving new password in .htpasswdCode for saving new password in .htpasswd
if ( ($userlist{$username} eq if ( ($userlist{$username} eq crypt($oldpassword,crypt($oldpassword,$userlist{$username}) ) {$userlist{$username}) ) {
$userlist{$username} = $userlist{$username} = crypt($newpassword,"giri");crypt($newpassword,"giri");
&save_passwd_to_file;&save_passwd_to_file;
}}&save_passwd_to_file&save_passwd_to_fileforeach (keys(%userlist)) foreach (keys(%userlist)) { { print OUT "$_:$userlist{$_}\n";print OUT "$_:$userlist{$_}\n"; }}
![Page 9: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/9.jpg)
Admin PageAdmin Page
![Page 10: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/10.jpg)
User PageUser Page
![Page 11: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/11.jpg)
Difficulties FacedDifficulties Faced
Sending email to the recipient Sending email to the recipient addressaddress
Passing variable from one file to Passing variable from one file to another fileanother file
Dealing with password encryption.Dealing with password encryption.
![Page 12: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/12.jpg)
What we have LearntWhat we have Learnt
Learned to use sql in perl cgi Learned to use sql in perl cgi programsprograms
Became familiar with Html and mysqlBecame familiar with Html and mysqlLearned to pass variables from one Learned to pass variables from one
file to another.file to another.Learned to use subroutines. Learned to use subroutines.
![Page 13: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/13.jpg)
Admin Flow ChartAdmin Flow Chart
Admin
Create User Account Managing the filesEdit and Delete
User account
![Page 14: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/14.jpg)
User Flow ChartUser Flow Chart
User
Change Password
![Page 15: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/15.jpg)
OverviewOverview
Files we used for this Project are as Files we used for this Project are as follows:follows:
Finalproject.cgi-creates mainpage for Finalproject.cgi-creates mainpage for AdminAdmin
http://perl.cs.ohlone.edu/~gen19/Finhttp://perl.cs.ohlone.edu/~gen19/FinalProject.cgialProject.cgi
![Page 16: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/16.jpg)
Create.cgi-It creates new user and saves Create.cgi-It creates new user and saves the username and encrypted password in the username and encrypted password in .htpasswd file .It will send the username .htpasswd file .It will send the username and password to the user’s email.and password to the user’s email.
Password = welcomePassword = welcome
http://perl.cs.ohlone.edu/~gen19/create.cgihttp://perl.cs.ohlone.edu/~gen19/create.cgi
![Page 17: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/17.jpg)
login.cgi-It allows user to login after login.cgi-It allows user to login after checking username and passwordchecking username and password. .
http://perl.cs.ohlone.edu/~gen19/logihttp://perl.cs.ohlone.edu/~gen19/login.cgi n.cgi
changepass.cgi-It allows user to changepass.cgi-It allows user to change the passwordchange the password..
http://perl.cs.ohlone.edu/~gen19/chahttp://perl.cs.ohlone.edu/~gen19/changepass.cgingepass.cgi
![Page 18: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/18.jpg)
editemail.cgi-it gets valid username to edit their editemail.cgi-it gets valid username to edit their emailsemails. .
http://perl.cs.ohlone.edu/~gen19/editemail.cgihttp://perl.cs.ohlone.edu/~gen19/editemail.cgi
newemail.cgi-It gets the new email to be editednewemail.cgi-It gets the new email to be edited. .
http://perl.cs.ohlone.edu/~gen19/newemail.cgi http://perl.cs.ohlone.edu/~gen19/newemail.cgi
![Page 19: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/19.jpg)
updateemail.cgi-It updates new email in updateemail.cgi-It updates new email in database. [Tablename:gen19_userinfo]database. [Tablename:gen19_userinfo]
http://perl.cs.ohlone.edu/~gen19/updateemhttp://perl.cs.ohlone.edu/~gen19/updateemail.cgiail.cgi
editprogram.cgi-it gets valid username to editprogram.cgi-it gets valid username to edit their programsedit their programs..
http://perl.cs.ohlone.edu/~gen19/editprograhttp://perl.cs.ohlone.edu/~gen19/editprogram.cgim.cgi
![Page 20: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/20.jpg)
newprogram.cgi-It gets the new program to be newprogram.cgi-It gets the new program to be editededited..
http://perl.cs.ohlone.edu/~gen19/newprogram.chttp://perl.cs.ohlone.edu/~gen19/newprogram.cgigi
updateprogram.cgi-It updates new program in updateprogram.cgi-It updates new program in database. [Tablename:gen19_userinfo]database. [Tablename:gen19_userinfo]
http://perl.cs.ohlone.edu/~gen19/updateprograhttp://perl.cs.ohlone.edu/~gen19/updateprogram.cgim.cgi
![Page 21: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/21.jpg)
delete.cgi-It deletes the record from delete.cgi-It deletes the record from database and .htpasswd file.database and .htpasswd file.
http://perl.cs.ohlone.edu/~gen19/delhttp://perl.cs.ohlone.edu/~gen19/delete.cgiete.cgi
![Page 22: Final Project Implementation of Basic Authentication.](https://reader036.fdocuments.us/reader036/viewer/2022062308/56649eda5503460f94be8f73/html5/thumbnails/22.jpg)
Thank YouThank You
Many thanks to Prof Jon Degallier for Many thanks to Prof Jon Degallier for helping us with our learning process.helping us with our learning process.
The Discussion Board is very useful The Discussion Board is very useful to help each other. We really to help each other. We really appreciate it and thanks to all. appreciate it and thanks to all.