Kojiro20
Kojiro20
I solved this in a pretty nice way for FastAPI but they just give me 👎 and no discussion @tiangolo please consider it 🦗: https://github.com/tiangolo/fastapi/pull/2626 My approach solves both issues...
I understand what you're trying to do - but if you'll bear with me a little - I'll try to explain what I meant by 'it solves both problems' above....
That sounds better suited to a middleware decorator IMO. To use the single-instance class version tho you could instantiate your authorization validator during app initialization and provide it to your...
I've been using middleware for authentication for all requests that match a path prefix. For authorization the rules become more specific - but are usually also grouped with a path-prefix....
I made a simple fix for this here: https://github.com/encode/starlette/pull/1090 - ping me if anyone wants to revitalize pull request. I also posted some monkey-patch workaround and @kevinastone has a good...