summaryrefslogtreecommitdiff
path: root/src/routes.php
diff options
context:
space:
mode:
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"]);
};