공부
[FastApi] Bearer
승가비
2023. 9. 16. 22:29
728x90
from typing import Annotated
from fastapi import Depends
from fastapi.security import HTTPBearer, HTTPBasicCredentials
security = HTTPBearer()
@app.get("/api/v1/test")
def test(
token: Annotated[HTTPBasicCredentials, Depends(security)],
How to Pass Authorization Header from Swagger Doc in Python Fast API
I am trying to pass authorization header using Documentation page, similar to this page: Since, the documentations are automatic generated in Fast API, I am having hard time trying to figure this ...
stackoverflow.com
728x90