Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Password Expiration Dates | Closes Issue #15 #85

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dhokladrijaa
Copy link
Contributor

@dhokladrijaa dhokladrijaa commented Dec 16, 2024

Related Issue
Closes #15

Type of Change

  • New Feature
  • Code Refactor

Description of Change
New feature to set an expiration date for each password while adding it, in the format YYYY-MM-DD.
If password has expired, user can either:

  • Update the password with a new one and set a new expiration date.
  • Remove the password from the password manager.

Implementation Details

  1. In the add_password workflow, I modified the program to prompt user to enter an expiration date when adding a new password, validate date format using datetime.strptime and check if the entered date has expired or not

  2. Introduced a logic to handle expired passwords- _is_expired (to check if the given date has passed) and handle_expired_password (which manages expired passwords by offering the update/remove options.)

  3. The password file now includes expiration dates in the format:

site_name:encrypted_password:expiration_date

when loading or saving passwords, the program reads and process expiration dates from the file using load_password_file and add_password.

  1. self.password_dict stores both the password and its expiration date
  2. Expired password handling was introduced into add_password

Demo
image

@dhokladrijaa dhokladrijaa changed the title Set Password Expiration Dates | Closes Issue #15 Set Password Expiration Dates | Closes #15 Dec 16, 2024
@dhokladrijaa dhokladrijaa changed the title Set Password Expiration Dates | Closes #15 Set Password Expiration Dates | Closes Issue #15 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement password expiration functionality
1 participant