An employee needs to access sensitive data. In order that the employee can create a strong password that provides greater security, the source code in this repository randomly generates a password that meets user selected criteria.
- When the user clicks the button to generate a password, they are for the length of the password.
- If the the length of the password is less than 7, or greater than 128, or not number, they are alerted with a message and prompted for the length of the password again.
- When a valid length is entered, then the user presented with a series of prompts for password criteria.
- When asked for character types to include in the password the user confirms whether or not to include lowercase, uppercase, numeric, and/or special characters.
- The input is validated such that at least one confirmed character type is selected.
- If no character types are selected, the user is alerted with a message and prompted with the series of password criteria again.
- When at least one character type is selected, then a password is generated that matches the selected criteria.
- When the password is generated, then the password is written to the page.
