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

Replace tuple return type with namedtuple in security middleware #16

Merged
merged 1 commit into from
May 26, 2024

Conversation

maxachis
Copy link

Fixes

Description

  • The function 'is_valid' in the security middleware has been refactored. Instead of returning a Tuple, it now returns an instance of APIKeyStatus, which is a namedtuple. This namedtuple structure improves readability and understanding of the code by labeling the boolean values it returns.

Testing

  • None. is_valid will need to have tests added at a later point.

Performance

  • Minimal performance impact.

Docs

  • Not applicable

The function 'is_valid' in the security middleware has been refactored. Instead of returning a Tuple, it now returns an instance of APIKeyStatus, which is a namedtuple. This namedtuple structure improves readability and understanding of the code by labeling the boolean values it returns.
@maxachis maxachis merged commit 2672d5e into dev May 26, 2024
9 checks passed
@maxachis maxachis deleted the mc_add_named_tuples branch May 26, 2024 23:51
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.

1 participant