-
Notifications
You must be signed in to change notification settings - Fork 93
feat(auth): allow consuming access tokens directly #3642
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
base: main
Are you sure you want to change the base?
feat(auth): allow consuming access tokens directly #3642
Conversation
|
This is a WIP and is missing all documentation for the new interface. Pros:
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3642 +/- ##
==========================================
- Coverage 96.14% 95.96% -0.18%
==========================================
Files 140 144 +4
Lines 5442 5574 +132
==========================================
+ Hits 5232 5349 +117
- Misses 210 225 +15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I don't know what is the exact level of test coverage we want, but 46% is too low. |
this is also missing tests, is just a draft for the public API. |
dbolduc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, this approach makes a lot of sense to me. It is lamentable that we are already making backwards compatibility sacrifices in version 1.1.0 of a library, but that is where we are.
I think I messed up by making Credentials an opaque object instead of a trait. I think at the time I was afraid of all the generics that entailed... but now I realize that is just what flexible Rust looks like.
| ) | ||
| .build()?; | ||
| //TODO: revert - this is just to show that AccessTokenCredentials is compatible with Credentials | ||
| .build_access_token_credentials()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I think build_foo() is not that crazy.
For example, for 99% of our builders, we have a send(), but in storage, our builder::WriteObject has send_buffered() and send_unbuffered().
Q: do we recommend applications use build() or build_access_token_credentials() ?
Fixes #2929 and #3362