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

Basic Auth for multiple users. #352

Merged
merged 14 commits into from
Jul 15, 2024
Merged

Basic Auth for multiple users. #352

merged 14 commits into from
Jul 15, 2024

Conversation

hkiiita
Copy link
Contributor

@hkiiita hkiiita commented Jun 19, 2024

This PR adresses Basic Auth #330 for multiple users. Please review.

@hkiiita
Copy link
Contributor Author

hkiiita commented Jun 19, 2024

@dfarr Please have a look.

@dfarr
Copy link
Member

dfarr commented Jun 24, 2024

Sorry for the delay in reviewing @hkiiita , this looks great! I have one request, rather than have a separate file for username/password information could we change this to use the default configuration file? The file could look like this:

auth:
  - username: user1
    password: pass1
  - username: user2
    password: pass2

@hkiiita
Copy link
Contributor Author

hkiiita commented Jul 1, 2024

Thanks for having a look @dfarr ; please review the new changes. I have removed the separate creds file as asked and am now reading credentials from the main config file itself.

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.10%. Comparing base (32bd3b7) to head (5935351).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
- Coverage   58.12%   58.10%   -0.03%     
==========================================
  Files         113      113              
  Lines        9943     9938       -5     
==========================================
- Hits         5779     5774       -5     
  Misses       3796     3796              
  Partials      368      368              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@dfarr dfarr 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 @hkiiita! Now that we are using viper for the configuration we shouldn't need to do manual parsing of the configuration, as long as we specify the type I believe viper will parse automatically for us.

cmd/root.go Outdated Show resolved Hide resolved
cmd/serve/serve.go Outdated Show resolved Hide resolved
cmd/serve/serve.go Outdated Show resolved Hide resolved
internal/app/subsystems/api/http/http.go Outdated Show resolved Hide resolved
internal/app/subsystems/api/http/http.go Outdated Show resolved Hide resolved
@hkiiita hkiiita requested a review from dfarr July 8, 2024 11:52
Copy link
Member

@dfarr dfarr left a comment

Choose a reason for hiding this comment

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

🎉

@hkiiita
Copy link
Contributor Author

hkiiita commented Jul 9, 2024

🎉

Thank you so much @dfarr for the journey. I definitely learned a couple of things during this. Thanks again !

@dfarr dfarr merged commit cff38d2 into resonatehq:main Jul 15, 2024
6 checks 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