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

Feature: Add API Key support (🚧) #350

Open
wants to merge 1 commit into
base: v1.0.0-alpha
Choose a base branch
from

Conversation

grablair
Copy link
Contributor

@grablair grablair commented Jan 18, 2025

Resolves #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.

Screenshot 2025-01-18 at 09 46 30
Screenshot 2025-01-18 at 09 46 37
Screenshot 2025-01-18 at 09 46 46
Screenshot 2025-01-18 at 09 47 06

Checklist

  • I have read the contributing guidelines.
  • My code is of good quality and follows the coding standards of the project.
  • I have tested my changes, and they work as expected.

Thank you for your contribution! 🎉

@daveearley
Copy link
Contributor

Nice! Thanks for contributing this. I'll set aside some time tomorrow to review it.

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