Move to async
I needed to use this library from an async context, decided to move it all the way to async-only after experimenting with having sync/async behind feature flags.
Let me know what you think about this approach @davidgraeff, the tests and Rocket-specific code still need to be ported to async.
When downloading google JWKS, I parse the Cache-Control header to know how long the keys are valid for and download new JWKS if the keys have expired. We are using this library with long running server processes and Google tends to rotate these keys every so often causing rare token validation failures.
async is infectious so it leaks out here and there, but I was mostly guided by the speed of getting this port out of the door to unblock some async contexts in our codebase.
what needs to happen for this to go upstream?
Hey @mkawalec - thanks for putting this PR together. A lot of things needed to be updated to accomplish the move to async but I think this represents a very strong body of work. I have a few suggestions for this
- This is currently failing the CI checks because of non-signed commits. Can you address this in the instructions provided in the failing checks?
- I would consider squashing your changes into a few meaningful commits. Although this is not a widely trafficked library, it would be nice to have a meaningful and organized git history
- Usage of conventional commits in the commit messages. While there is not currently a CONTRIBUTING.md attached to this repo - there is quite a fair amount of usage in the current git history.
I would like to spend some more time doing further review for the more complicated changes presented
Thanks a lot for the contribution, thanks @JadedEvan for the review. Async support has been merged with https://github.com/davidgraeff/firestore-db-and-auth-rs/pull/34. I have taken your pull request as base and added the missing parts. This crate is async only now.