chat: add initial GuildsController
This commit is contained in:
parent
7b4cbd4fb7
commit
727f2f6ba2
23 changed files with 248 additions and 38 deletions
|
@ -1,3 +1,4 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using Foxchat.Core.Federation;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
|
@ -5,11 +6,12 @@ namespace Foxchat.Core.Extensions;
|
|||
|
||||
public static class HttpContextExtensions
|
||||
{
|
||||
public static bool ExtractRequestData(this HttpContext ctx, out string signature, out string domain, out SignatureData data)
|
||||
public static bool ExtractRequestData(this HttpContext ctx, [NotNullWhen(true)] out string? signature,
|
||||
[NotNullWhen(true)] out string? domain, [NotNullWhen(true)] out SignatureData? data)
|
||||
{
|
||||
signature = string.Empty;
|
||||
domain = string.Empty;
|
||||
data = SignatureData.Empty;
|
||||
signature = null;
|
||||
domain = null;
|
||||
data = null;
|
||||
|
||||
if (!ctx.Request.Headers.TryGetValue(RequestSigningService.SIGNATURE_HEADER, out var encodedSignature))
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue