Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with fastapi openapi authentication #10

Open
xtrm0 opened this issue Nov 1, 2022 · 0 comments
Open

Integrate with fastapi openapi authentication #10

xtrm0 opened this issue Nov 1, 2022 · 0 comments

Comments

@xtrm0
Copy link

xtrm0 commented Nov 1, 2022

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 = Depends(get_db)):
  user = User.get_user(db, request.user.userid)
  return user

Is not detected by fastapi's openapi generator as an authenticated endpoint. Is there a way to make this library integrate correctly with the openapi generator.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant