mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Crude OpenID Connect client using Authlib
Developers can go to /sso/login to get redirected to the SSO. On successful login, the ID token is displayed. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
b1300117ac
commit
3b347d3989
8 changed files with 72 additions and 2 deletions
|
@ -1,3 +1,16 @@
|
|||
from fastapi import FastAPI
|
||||
from starlette.middleware.sessions import SessionMiddleware
|
||||
|
||||
import aurweb.config
|
||||
|
||||
from aurweb.routers import sso
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
session_secret = aurweb.config.get("fastapi", "session_secret")
|
||||
if not session_secret:
|
||||
raise Exception("[fastapi] session_secret must not be empty")
|
||||
|
||||
app.add_middleware(SessionMiddleware, secret_key=session_secret)
|
||||
|
||||
app.include_router(sso.router)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue