Authentication System Pseudocode
Authentication System Pseudocode :
initialize i to 3 // for the number of tries
user gets
while i> 0
input username and password
convert entered password to the md5 code
open users file
if username entered does exists
then
return password from the file
if returned password matches exactly with the md5
of user entered password then
login successful
call authorization(username)
return is true
else
print error message login failed password
incorrect
decrease i by 1
else
print error message Invalid Username or
Password
decrease i by 1
if i is equal to 0 then
print error message max tries exceeded
return false
authorization(username)
open credential file
fetch the role for the given username
print it on the screen
close the file
main
call authentication and store the return value
in login variable
if login is true then
show logout option
else
show login and exit options
"Looking for a Similar Assignment? Order now and Get 10% Discount! Use Code "Newclient"
