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.
Feature Request
Motivation
I found
tower_http::validate_request::ValidateRequestHeaderLayer::bearervery 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.