Resource server: read the required scope in access token
All checks were successful
/ build (push) Successful in 15s
/ test (push) Successful in 5s

This commit is contained in:
phil 2025-01-30 20:40:04 +01:00
parent f910834736
commit b3e19b3e40
4 changed files with 129 additions and 37 deletions

View file

@ -53,16 +53,14 @@ origins = [
"https://philo.ydns.eu/",
]
@asynccontextmanager
async def lifespan(app: FastAPI):
await get_providers_info()
yield
app = FastAPI(
title="OIDC auth test",
lifespan=lifespan
)
app = FastAPI(title="OIDC auth test", lifespan=lifespan)
app.add_middleware(
@ -284,7 +282,6 @@ async def non_compliant_logout(
@app.get("/resource/{id}")
async def get_resource_(
id: str,
request: Request,
# user: Annotated[User, Depends(get_current_user)],
# oidc_provider: Annotated[StarletteOAuth2App, Depends(get_oidc_provider)],
# token: Annotated[OAuth2Token, Depends(get_token)],
@ -294,7 +291,7 @@ async def get_resource_(
return JSONResponse(await get_resource(id, user))
# Routes for test
# Routes for RBAC based tests
@app.get("/public")