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

Maintain a cache of idempotency keys and check for reuse #25

Closed
brandur-stripe opened this issue Oct 16, 2017 · 0 comments
Closed

Maintain a cache of idempotency keys and check for reuse #25

brandur-stripe opened this issue Oct 16, 2017 · 0 comments
Assignees

Comments

@brandur-stripe
Copy link
Contributor

It would be nice if stripe-mock maintained a set of recently used idempotency keys to detect when a client tries to reuse a key with different parameters. In those cases we could reject the request just like the real Stripe API would do. (Keys would be evicted from the cache after some period of time so that it doesn't grow in an unbounded way.)

This would have caught the problem in stripe/stripe-ruby#598.

@brandur-stripe brandur-stripe self-assigned this Oct 16, 2017
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

No branches or pull requests

2 participants