From 4e4b2dab1774cb5fb7d7e05435eab3dd83112620 Mon Sep 17 00:00:00 2001 From: Loporrit <141286461+loporrit@users.noreply.github.com> Date: Sat, 28 Jun 2025 13:35:26 +0000 Subject: [PATCH] Add createWithIdentV2 (.well-known stapling) --- MareSynchronosAPI/Dto/AuthReplyDto.cs | 11 +++++++++++ MareSynchronosAPI/Routes/MareAuth.cs | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 MareSynchronosAPI/Dto/AuthReplyDto.cs diff --git a/MareSynchronosAPI/Dto/AuthReplyDto.cs b/MareSynchronosAPI/Dto/AuthReplyDto.cs new file mode 100644 index 0000000..d3033fd --- /dev/null +++ b/MareSynchronosAPI/Dto/AuthReplyDto.cs @@ -0,0 +1,11 @@ +using MareSynchronos.API.Data; +using MessagePack; + +namespace MareSynchronos.API.Dto; + +[MessagePackObject(keyAsPropertyName: true)] +public record AuthReplyDto +{ + public string Token { get; set; } = string.Empty; + public string? WellKnown { get; set; } +} \ No newline at end of file diff --git a/MareSynchronosAPI/Routes/MareAuth.cs b/MareSynchronosAPI/Routes/MareAuth.cs index 85adb56..3bbb304 100644 --- a/MareSynchronosAPI/Routes/MareAuth.cs +++ b/MareSynchronosAPI/Routes/MareAuth.cs @@ -2,10 +2,11 @@ public class MareAuth { - public const string Auth = "/auth"; public const string Auth_CreateIdent = "createWithIdent"; + public const string Auth_CreateIdentV2 = "createWithIdentV2"; public const string Auth_Register = "registerNewKey"; public static Uri AuthFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_CreateIdent); + public static Uri AuthV2FullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_CreateIdentV2); public static Uri AuthRegisterFullPath(Uri baseUri) => new Uri(baseUri, Auth + "/" + Auth_Register); } \ No newline at end of file