0.1.0
This commit is contained in:
@@ -0,0 +1 @@
|
||||
'''web server routes'''
|
||||
@@ -0,0 +1,9 @@
|
||||
from fastapi import APIRouter
|
||||
from fastapi.security import OAuth2PasswordRequestForm, OAuth2PasswordBearer
|
||||
|
||||
router=APIRouter(prefix="/protected")
|
||||
oauth2_scheme=OAuth2PasswordBearer(tokenUrl="/protected/token")
|
||||
|
||||
@router.get("")
|
||||
def protected()->dict:
|
||||
return {"protected router": "Hello, this is a protected router"}
|
||||
Reference in New Issue
Block a user