yuanshen/Yuanshen.SDK/Handlers/AuthHandler.cs
wisedev fc2ac1050f First working version of the server
KCP gameserver with packet dispatch, scene streaming, combat, gacha and the
shop, plus a small HTTP server for the login flow and the wish history page.

Game data under assets is pulled out of the client instead of being typed by
hand. The excel tables come from the packed bin container and the spawn points
from the compiled scene scripts.
2026-09-04 02:10:50 +03:00

22 lines
885 B
C#

using Yuanshen.SDK.Models;
namespace Yuanshen.SDK.Handlers;
public static class AuthHandler
{
public static IResult OnCaptchaRequest() => Ok(new CaptchaData());
public static IResult OnLoadConfig() => Ok(new LoadConfigData());
public static IResult OnGetConfig() => Ok(new ComboConfigData());
public static IResult OnGetProtocol() => Ok(new GetProtocolData());
public static IResult OnPasswordLogin() => Ok(new ShieldLoginData());
public static IResult OnGranterLogin() => Ok(new GranterLoginData());
public static IResult OnBeforeVerify() => Ok(new BeforeVerifyData());
public static IResult OnGenAuthKey() => Ok(new GenAuthKeyData
{
Authkey = Convert.ToBase64String(Guid.NewGuid().ToByteArray())
});
private static IResult Ok<T>(T data) =>
TypedResults.Text(Json.Ser(new Rsp<T> { Data = data }), "application/json");
}