summaryrefslogtreecommitdiff
path: root/src/routes.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-08-13 21:50:27 +0200
committerDaniel Weipert <git@mail.dweipert.de>2025-08-13 21:50:27 +0200
commit3f4b51b99a4f4dc41dbdce7f34afe7e15d3d426e (patch)
treeeed0848f59e70aac075ba09bbb1b6e52a62a681f /src/routes.php
parentbeb68ad3ddc48f9e913815e0e18f11965201f32e (diff)
get login types route and various
Diffstat (limited to 'src/routes.php')
-rw-r--r--src/routes.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/routes.php b/src/routes.php
index 21113dc..2d1c3e0 100644
--- a/src/routes.php
+++ b/src/routes.php
@@ -2,6 +2,7 @@
namespace App;
+use App\Controllers\LoginController;
use App\Controllers\ServerDiscoveryController;
use App\Controllers\ServerImplementationController;
use Symfony\Component\Routing\Loader\Configurator\RouteConfigurator;
@@ -37,5 +38,18 @@ return function (RouteConfigurator $routes): void
# /_matrix/key/v2/query
# /_matrix/key/v2/query/{serverName}
+ $supportedLoginTypes = [LoginController::class, "supportedLoginTypes"];
+ $routes
+ ->add("matrix_client_r0_login_types", "/_matrix/client/r0/login")
+ ->controller($supportedLoginTypes)
+ ->methods(["GET"]);
+ $routes
+ ->add("matrix_client_v3_login_types", "/_matrix/client/v3/login")
+ ->controller($supportedLoginTypes)
+ ->methods(["GET"]);
+ $routes
+ ->add("matrix_client_v3_login", "/_matrix/client/v3/login")
+ ->controller($supportedLoginTypes)
+ ->methods(["POST"]);
};