fastapi-auth-middleware icon indicating copy to clipboard operation
fastapi-auth-middleware copied to clipboard

Lightweight auth middleware for FastAPI that just works. Fits most auth workflows with only a few lines of code

Results 7 fastapi-auth-middleware issues
Sort by recently updated
recently updated
newest added

Is there a way to make this middleware correctly integrate with the openapi generators from fastapi? For instance. Currently, this: ``` @router.get("/me", response_model=schemas.User) @requires('user') async def read_user_me(request: Request, db: Session...

I'm trying the middleware and [reading the docs](https://fastapi-auth-middleware.code-specialist.com/examples/multiple/) > Once Starlette includes this and FastAPI adopts it, there will be a more elegant solution to this. FYI https://github.com/encode/starlette/pull/1649

Add OAuth2 example to the Readme.md to improve the preview

Add an example of using the oauth2 backend with FastAPI Keycloak to enable automatic access token renewal

there are user with admin role, manager role and operator role, some endpoint are accessible if user is admin `or` manager which different response and other endpoint are exclusively for...

In my `verify_header` route, I may be making relatively costly DB calls, HTTP calls etc. The middleware still runs for 404 requests, resulting in an indirect Denial of Service attack...