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

feat: add bearer auth #12

Merged
merged 1 commit into from
Apr 12, 2024
Merged

feat: add bearer auth #12

merged 1 commit into from
Apr 12, 2024

Conversation

Code42Cate
Copy link
Contributor

Hi!

This PR adds basic authentication functionality for the metrics endpoint using bearer tokens.

  • Added bearer_auth_token / BEARER_AUTH_TOKEN as an optional parameter to configuration
  • Added auth middleware file ./server/auth.go
  • Added 3 basic test cases to ./server/auth_test.go
  • Adapted README and added further instructions

I hope this is good enough, if not please let me know what I can fix :)

Cheers,
Jonas

Copy link
Owner

@riesinger riesinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for implementing this!

@riesinger riesinger merged commit 13cafdc into riesinger:main Apr 12, 2024
1 check passed
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