Noticed this while testing D10931.
For authenticated endpoints this doesnt matter because they're always behind auth middleware.
But for optionally-authenticated endpoints, the request extensions isn't set by the middleware so it's always None.
Using AuthorizationCredential::from_request() also does the extensions check if possible so it's better to call it instead.
Details
Details
Test plan for D10931
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
services/reports/src/service.rs | ||
---|---|---|
238 | Ah, I should also update the comment. This should be Some for all endpoints as long as the Authorization header is provided. |