mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-18 09:54:59 +01:00
External authentication
This commit is contained in:
@@ -24,6 +24,12 @@ public final class DispatchHandler implements Router {
|
||||
express.post("/hk4e_global/mdk/shield/api/verify", DispatchHandler::tokenLogin);
|
||||
// Combo token login (from session key).
|
||||
express.post("/hk4e_global/combo/granter/login/v2/login", DispatchHandler::sessionKeyLogin);
|
||||
|
||||
// External login (from other clients).
|
||||
express.get("/authentication/type", (request, response) -> response.send(Grasscutter.getAuthenticationSystem().getClass().getSimpleName()));
|
||||
express.post("/authentication/login", (request, response) -> response.status(500).send("{\"notice\":\"This API is deprecated.\"}"));
|
||||
express.post("/authentication/register", (request, response) -> response.status(500).send("{\"notice\":\"This API is deprecated.\"}"));
|
||||
express.post("/authentication/change_password", (request, response) -> response.status(500).send("{\"notice\":\"This API is deprecated.\"}"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package emu.grasscutter.server.http.handlers;
|
||||
|
||||
import emu.grasscutter.server.http.Router;
|
||||
import express.Express;
|
||||
import io.javalin.Javalin;
|
||||
|
||||
/**
|
||||
* Handles the legacy authentication system routes.
|
||||
*/
|
||||
public final class LegacyAuthHandler implements Router {
|
||||
@Override public void applyRoutes(Express express, Javalin handle) {
|
||||
express.get("/authentication/type", (request, response) -> response.status(500).send("{\"notice\":\"This API is deprecated.\"}"));
|
||||
express.post("/authentication/login", (request, response) -> response.status(500).send("{\"notice\":\"This API is deprecated.\"}"));
|
||||
express.post("/authentication/register", (request, response) -> response.status(500).send("{\"notice\":\"This API is deprecated.\"}"));
|
||||
express.post("/authentication/change_password", (request, response) -> response.status(500).send("{\"notice\":\"This API is deprecated.\"}"));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user