Programming Authentication (Edexcel GCSE Computer Science)
Revision Note
Programming Authentication
What is Authentication?
Authentication is the process of ensuring that a system is secure by asking the user to complete tasks to prove they are an authorised user of the system
Authentication is done because bots can submit data in online forms
Authentication can be done in several ways, these include
Usernames and Passwords
CAPTCHA
Other methods that programmers can do to authenticate the user include
Allowing users to recover passwords via email links and SMS codes
Encrypting data
How can authentication be programmed?
Authentication of usernames and passwords can be programmed in several ways, including using lists, databases and encryption
Students are required to be able to program looking up usernames and passwords using a list/array
To do this successfully, a 2-dimensional list/array will be used
Python example | ||
---|---|---|
# Set a Boolean flag to track if the username is found
# List of usernames and corresponding passwords
# Ask the user to input their username
# Loop through each username in the list
# Check if the entered username matches any in the list
# Check if the username was not found
| ||
Last updated:
You've read 0 of your 10 free revision notes
Unlock more, it's free!
Did this page help you?