from fastapi.security import OAuth2PasswordBearer,OpenIdConnect
oidc_scheme = OpenIdConnect(
openIdConnectUrl=f"{os.getenv("ZITADEL_BASE_URL")}/.well-known/openid-configuration"
)
async def get_zitadel_principal(introspected_token: Annotated[dict, Depends(oidc_scheme)]):
zitadel_id = introspected_token.get("sub")
# other code
from fastapi.security import OAuth2PasswordBearer,OpenIdConnect
oidc_scheme = OpenIdConnect(
openIdConnectUrl=f"{os.getenv("ZITADEL_BASE_URL")}/.well-known/openid-configuration"
)
async def get_zitadel_principal(introspected_token: Annotated[dict, Depends(oidc_scheme)]):
zitadel_id = introspected_token.get("sub")
# other code