2828 AdminHandler ,
2929 authentication ,
3030 authentication_default ,
31+ login_default ,
3132 orchestrate ,
3233)
3334
@@ -57,8 +58,10 @@ async def create_application(self) -> web.Application:
5758 auth = self .config .rest .auth
5859 if auth is not None and auth .enabled :
5960 app .router .add_route ("*" , "/auth" , authentication_default )
61+ app .router .add_route ("*" , "/auth/login" , login_default )
6062 for service in auth .services :
6163 app .router .add_route ("*" , f"/auth/{ service .name } " , authentication )
64+ app .router .add_route ("POST" , f"/auth/{ service .name } /login" , authentication )
6265
6366 app .router .add_route ("POST" , "/admin/login" , AdminHandler .login )
6467 app .router .add_route ("GET" , "/admin/endpoints" , AdminHandler .get_endpoints )
@@ -68,7 +71,8 @@ async def create_application(self) -> web.Application:
6871 app .router .add_route ("DELETE" , "/admin/rules/{id}" , AdminHandler .delete_rule )
6972
7073 # Administration routes
71- aiohttp_jinja2 .setup (app , loader = jinja2 .FileSystemLoader ("minos/api_gateway/rest/backend/templates" ))
74+ path = Path (Path .cwd ())
75+ aiohttp_jinja2 .setup (app , loader = jinja2 .FileSystemLoader (f"{ path } /minos/api_gateway/rest/backend/templates" ))
7276 app .router .add_route ("*" , "/administration{path:.*}" , self .handler )
7377 # app.router.add_route("GET", "/administration/{filename:.*}", self._serve_files)
7478
0 commit comments