mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-27 00:05:12 +02:00
9 lines
282 B
Python
9 lines
282 B
Python
from fastapi import Depends, APIRouter
|
|
from fastapi.security import OpenIdConnect
|
|
|
|
oidc = OpenIdConnect(openIdConnectUrl="http://localhost:8080/realms/tools/.well-known/openid-configuration")
|
|
app = APIRouter()
|
|
|
|
@app.get("/foo")
|
|
async def bar(token = Depends(oidc)):
|
|
return token |