【发布时间】:2020-05-29 23:59:41
【问题描述】:
fastapi 招摇不发送带有标头的令牌。即使我通过swagger的授权按钮登录。 这是它显示的网址: curl -X GET "http://localhost:8000/locations/?limit=100" -H "accept: application/json" -H "Authorization: Bearer undefined"
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/users/createtoken")
【问题讨论】:
-
同样的问题,除了我通过 Depends 和声明参数授权的方法解析授权:str = Header(...)
标签: authorization fastapi