Add project files

This commit is contained in:
Sean Greenawalt 2025-05-10 05:16:40 -04:00
commit 8cf01ead74
Signed by: seang96
GPG key ID: 504F02B511005571
40 changed files with 3967 additions and 0 deletions

View file

@ -0,0 +1,7 @@
namespace StalwartSimpleLoginMiddleware.Models;
public class AddApiKeyMemberInput
{
public string ApiKey { get; set; }
public MemberInput Member { get; set; }
}

View file

@ -0,0 +1,9 @@
using AspNetCore.Authentication.ApiKey;
namespace StalwartSimpleLoginMiddleware.Models;
public class ApiKeyAccessor : IApiKeyAccessor
{
public IApiKey ApiKey { get; set; }
public KeyMetadata Metadata { get; set; }
}

View file

@ -0,0 +1,8 @@
namespace StalwartSimpleLoginMiddleware.Models;
public class ApiKeyInput
{
public string OwnerEmail { get; set; }
public bool IsAdmin { get; set; }
public ICollection<MemberInput> Members { get; set; }
}

View file

@ -0,0 +1,11 @@
using System.Security.Claims;
using AspNetCore.Authentication.ApiKey;
namespace StalwartSimpleLoginMiddleware.Models;
public class DbApiKey : IApiKey
{
public string Key { get; set; }
public string OwnerName { get; set; }
public IReadOnlyCollection<Claim> Claims { get; set; }
}

View file

@ -0,0 +1,9 @@
using AspNetCore.Authentication.ApiKey;
namespace StalwartSimpleLoginMiddleware.Models;
public interface IApiKeyAccessor
{
IApiKey ApiKey { get; set; }
KeyMetadata Metadata { get; set; }
}

View file

@ -0,0 +1,8 @@
namespace StalwartSimpleLoginMiddleware.Models;
public class KeyMetadata
{
public string Domain { get; set; }
public ICollection<string> Members { get; set; }
public ICollection<string> ExternalMembers { get; set; }
}

View file

@ -0,0 +1,7 @@
namespace StalwartSimpleLoginMiddleware.Models;
public class MemberInput
{
public string Email { get; set; }
public bool IsExternal { get; set; }
}

View file

@ -0,0 +1,6 @@
namespace StalwartSimpleLoginMiddleware.Models;
public class NewRandomAliasInput
{
public string? Note { get; set; }
}

View file

@ -0,0 +1,21 @@
namespace StalwartSimpleLoginMiddleware.Models;
public class NewRandomAliasOutput
{
public DateTime CreationDate { get; set; }
public long CreationTimestamp { get; set; }
public string Email { get; set; }
public string Alias { get; set; }
public string Name { get; set; }
public bool Enabled { get; set; }
public int Id { get; set; }
public Mailbox Mailbox { get; set; }
public IEnumerable<Mailbox> Mailboxes { get; set; }
public string Note { get; set; }
}
public class Mailbox
{
public string Email { get; set; }
public int Id { get; set; }
}

View file

@ -0,0 +1,7 @@
namespace StalwartSimpleLoginMiddleware.Models;
public class UpdateOwnerEmailInput
{
public string ApiKey { get; set; }
public string OwnerEmail { get; set; }
}