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

fix: rate limiting #11

Merged
merged 2 commits into from
Mar 29, 2024
Merged

fix: rate limiting #11

merged 2 commits into from
Mar 29, 2024

Conversation

nsklikas
Copy link

  • Fix rate limiting logic
  • Separate code validation into 2 steps: ValidateCode and ValidateCodeSession. The first will be used to perform quick checks before we fetch the code from the database and the latter will be used to validate the code session that we fetched from the database. ValidateCodeSession is called when parsing the request and when constructing the response. This feels like an overkill but I didn't want to introduce any breaking changes.

@nsklikas
Copy link
Author

I have tested this using canonical/hydra-rock#39 and it works.

@nsklikas nsklikas enabled auto-merge March 29, 2024 11:22
@nsklikas nsklikas merged commit 3be7722 into canonical Mar 29, 2024
5 checks passed
@nsklikas nsklikas deleted the IAM-734-fix branch March 29, 2024 13:28
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