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

Added test to notebook for password token expiry #9274

Merged
merged 15 commits into from
Sep 9, 2024

Conversation

snwagh
Copy link
Contributor

@snwagh snwagh commented Sep 5, 2024

Added test to check password token expiry.

  • Reduce token expiry time to 3 seconds and test token expiry
  • Update email body to include the token expiration time

Closes https://github.com/OpenMined/Heartbeat/issues/1808

Repurposed variable token_exp_min to encode seconds.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@snwagh snwagh self-assigned this Sep 5, 2024
@snwagh snwagh changed the title Added test to notebook for password token expiry [WIP] - Added test to notebook for password token expiry Sep 5, 2024
@snwagh snwagh changed the title [WIP] - Added test to notebook for password token expiry Added test to notebook for password token expiry Sep 5, 2024
# expiry_time = settings.pwd_token_config.token_exp_min

# Option 2
settings_service = context.server.get_service("settingsservice")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we update to the context.server.services approach and remove the rest of this comment?

Copy link
Contributor Author

@snwagh snwagh Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will merge it with Teo's PR. Will wait for that to be merged so as to not create conflicts for his PR.

Copy link
Contributor

@BrendanSchell BrendanSchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just the one nitpicky comment to change how the service is called

@snwagh snwagh merged commit ba7d2b2 into dev Sep 9, 2024
37 checks passed
@snwagh snwagh deleted the snwagh/adding-test-for-password-token-expiry branch September 9, 2024 23:05
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.

2 participants