From 7784c60c03ec277b456db6e2709383e302d9382b Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Fri, 3 Jul 2026 15:49:08 +0200 Subject: Added basic oauth flow --- ttun_server/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ttun_server/__init__.py') diff --git a/ttun_server/__init__.py b/ttun_server/__init__.py index d54227a..4af6ca0 100644 --- a/ttun_server/__init__.py +++ b/ttun_server/__init__.py @@ -2,10 +2,11 @@ import logging import os from fastapi import FastAPI -from starlette.routing import Host, Route, WebSocketRoute +from starlette.routing import Host, Route, WebSocketRoute, Mount +from authentication.endpoints import authentication, oauth from proxy import app as proxy_app -from ttun_server.endpoints import health, base_endpoints +from ttun_server.endpoints import health from ttun_server.websockets import tunnel logging.basicConfig(level=getattr(logging, os.environ.get('LOG_LEVEL', 'INFO'))) @@ -13,6 +14,8 @@ logging.basicConfig(level=getattr(logging, os.environ.get('LOG_LEVEL', 'INFO'))) app = FastAPI( debug=True, routes=[ + Mount('/auth/', app=authentication), + Mount('/oauth/', app=oauth), WebSocketRoute('/tunnel/', endpoint=tunnel), Route('/health/', endpoint=health), Host(f'{{subdomain}}.{os.environ['TUNNEL_DOMAIN']}', app=proxy_app) -- cgit v1.2.3