You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have looked for existing issues (including closed) about this
Feature Request
Motivation
I found tower_http::validate_request::ValidateRequestHeaderLayer::bearer very convenient, but it's a bit too simplistic. I am thinking maybe we can have a layer that checks a lookup table that is dynamically changing, which should cover most of the use cases.
Proposal
I think we can let developers pass a closure which checks if a bearer token passed in the closure is valid or not, this should give them max flexibility.
Alternatives
Or, we can allow them to pass an object that impl a new trait.
The text was updated successfully, but these errors were encountered:
Feature Request
Motivation
I found
tower_http::validate_request::ValidateRequestHeaderLayer::bearer
very convenient, but it's a bit too simplistic. I am thinking maybe we can have a layer that checks a lookup table that is dynamically changing, which should cover most of the use cases.Proposal
I think we can let developers pass a closure which checks if a bearer token passed in the closure is valid or not, this should give them max flexibility.
Alternatives
Or, we can allow them to pass an object that impl a new trait.
The text was updated successfully, but these errors were encountered: