Feature: Add API Key support (🚧)
Resolves https://github.com/HiEventsDev/Hi.Events/issues/339
This is a WIP change to add API keys. The feature is implemented and admins can create API keys and they can be used to access the APIs in a granular fashion. I still need to complete all translations, and want to give @daveearley an opportunity to review this sooner rather than later.
This also adds a migration to add account_id to the token table, so tokens can be set up on a per-account basis, and the auth flow knows which account a token is attached to, as we don't have the JWT payload to tell us. (TODO: May need to implement key filtering from view for multiple-account situations)
Tested with expired tokens, tokens with missing abilities, and valid tokens.
Checklist
- [X] I have read the contributing guidelines.
- [X] My code is of good quality and follows the coding standards of the project.
- [X] I have tested my changes, and they work as expected.
Thank you for your contribution! 🎉
Nice! Thanks for contributing this. I'll set aside some time tomorrow to review it.
Is there somewhere a swagger documentation or the likes for the API?
Great work here! Thank you very much for the contribution. If it's OK with you, I can use this branch as the base for auth changes and I can push up some changes/fixes.
You're welcome! Thanks for the review. Definitely feel free to use this as a jumping off point for the auth refactor.
@grablair Don't worry about the conflicts here, I'll take care of them
I haven't forgotten about this! There are a few bugs and performance issues that gave taken priority, but I'll get back to it as soon as I can.
any progress on this? can I propose some support to make it merge to upsteam asap?
Any progress on this? :)
Good i like it