OpenID Connect Autodiscovery

This commit is contained in:
Tracker-Friendly 2024-03-28 18:13:24 +00:00
parent 642a6aad36
commit 98eef1005b
2 changed files with 12 additions and 0 deletions

4
main
View File

@ -417,6 +417,10 @@ async def homeserver():
async def mainapp(): async def mainapp():
return await render_template("main.html") return await render_template("main.html")
@app.route("/.well-known/openid-configuration")
async def openid():
return await render_template("openid.json")
# Start server # Start server
hypercornconfig = Config() hypercornconfig = Config()
hypercornconfig.bind = (HOST + ":" + PORT) hypercornconfig.bind = (HOST + ":" + PORT)

8
templates/openid.json Normal file
View File

@ -0,0 +1,8 @@
{
"issuer": "https://auth.hectabit.org",
"authorization_endpoint": "https://auth.hectabit.org/auth",
"token_endpoint": "https://auth.hectabit.org/authtoken",
"userinfo_endpoint": "https://auth.hectabit.org/userinfo",
"response_types_supported": ["code"],
"subject_types_supported": ["public"]
}