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 ability to customize authorization method #151

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Conversation

andyland
Copy link
Contributor

@andyland andyland commented Jun 23, 2024

Before submitting
  • [No] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

What does this PR do?

Currently, the only method to secure a LitServe endpoint is by providing an X-API-Key, which must be a global value. This excludes a wide-range of common authorization methods. This PR adds the ability to provide your own authorization method to a LitAPI. Example usage is added to the docs and tests

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@andyland andyland force-pushed the andy/custom-auth branch 4 times, most recently from cec0be3 to 3c2fc2e Compare June 23, 2024 07:14
Copy link

codecov bot commented Jun 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79%. Comparing base (0c91d64) to head (876729b).

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #151   +/-   ##
===================================
  Coverage    79%    79%           
===================================
  Files        13     13           
  Lines       931    933    +2     
===================================
+ Hits        733    737    +4     
+ Misses      198    196    -2     

Copy link
Collaborator

@lantiga lantiga left a comment

Choose a reason for hiding this comment

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

Looks perfect @andyland! Stamping immediately

@andyland andyland merged commit 6e12136 into main Jun 23, 2024
19 checks passed
@andyland andyland deleted the andy/custom-auth branch June 23, 2024 07:37
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.

None yet

2 participants