mirror of
https://github.com/maubot/maubot
synced 2025-09-07 22:00:39 +00:00
Add SSO support to mbc auth
This commit is contained in:
parent
f2bae18c7a
commit
ca7a980081
7 changed files with 177 additions and 40 deletions
|
@ -29,7 +29,12 @@ log = logging.getLogger("maubot.server")
|
|||
@web.middleware
|
||||
async def auth(request: web.Request, handler: Handler) -> web.Response:
|
||||
subpath = request.path[len(get_config()["server.base_path"]):]
|
||||
if subpath.startswith("/auth/") or subpath == "/features" or subpath == "/logs":
|
||||
if (
|
||||
subpath.startswith("/auth/")
|
||||
or subpath.startswith("/client/auth_external_sso/complete/")
|
||||
or subpath == "/features"
|
||||
or subpath == "/logs"
|
||||
):
|
||||
return await handler(request)
|
||||
err = check_token(request)
|
||||
if err is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue