IndominusByte / fastapi-jwt-auth

FastAPI extension that provides JWT Auth support (secure, easy to use, and lightweight)
http://indominusbyte.github.io/fastapi-jwt-auth/
MIT License
644 stars 150 forks source link

AuthJWT as a global auth object? #13

Closed jet10000 closed 3 years ago

jet10000 commented 3 years ago

The AuthJWT that was used to inject the engine in the API routes.

Can it be used as a global auth object?

it will dramatically reduce the required verbosity to use the object in an endpoint.

IndominusByte commented 3 years ago

You can check docs FastAPI about Dependencies in path operation decorators, maybe that's what you are looking for