-
Notifications
You must be signed in to change notification settings - Fork 161
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
Implement require_auth with validate_request #290
Conversation
Next could be the async version |
test-msrv fails on: Error: could not compile |
Any update on this? |
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.
Sorry the delay!
I think this looks great. Just a couple of nit picks.
If you merge latest master
then CI should be fixed.
Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
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.
Thanks!
I'm currently combing through PRs and issues to figure what goes into the next breaking release but this'll be part of that for sure.
- tower-http v0.4 fully replaces `RequireAuthorization` layer with `ValidateRequest`. We need to migrate our dependency accordingly - See v0.4 release notes: https://github.com/tower-rs/tower-http/releases/tag/tower-http-0.4.0 - See the relevant PR: tower-rs/tower-http#290
Motivation
This is a follow-up to: #289
ValidateRequest
is an abstraction of a validator andRequireAuthorization
is an instance, but the latter has yet to be implemented in terms of the former. They now are two independent types.Solution
RequireAuthorization
is now implemented byValidateRequest
.This is a breaking change.