Add project files
This commit is contained in:
parent
4dafed3553
commit
8cf01ead74
40 changed files with 3967 additions and 0 deletions
|
|
@ -0,0 +1,7 @@
|
|||
namespace StalwartSimpleLoginMiddleware.Models;
|
||||
|
||||
public class AddApiKeyMemberInput
|
||||
{
|
||||
public string ApiKey { get; set; }
|
||||
public MemberInput Member { get; set; }
|
||||
}
|
||||
9
StalwartSimpleLoginMiddleware/Models/ApiKeyAccessor.cs
Normal file
9
StalwartSimpleLoginMiddleware/Models/ApiKeyAccessor.cs
Normal 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; }
|
||||
}
|
||||
8
StalwartSimpleLoginMiddleware/Models/ApiKeyInput.cs
Normal file
8
StalwartSimpleLoginMiddleware/Models/ApiKeyInput.cs
Normal 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; }
|
||||
}
|
||||
11
StalwartSimpleLoginMiddleware/Models/DbApiKey.cs
Normal file
11
StalwartSimpleLoginMiddleware/Models/DbApiKey.cs
Normal 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; }
|
||||
}
|
||||
9
StalwartSimpleLoginMiddleware/Models/IApiKeyAccessor.cs
Normal file
9
StalwartSimpleLoginMiddleware/Models/IApiKeyAccessor.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using AspNetCore.Authentication.ApiKey;
|
||||
|
||||
namespace StalwartSimpleLoginMiddleware.Models;
|
||||
|
||||
public interface IApiKeyAccessor
|
||||
{
|
||||
IApiKey ApiKey { get; set; }
|
||||
KeyMetadata Metadata { get; set; }
|
||||
}
|
||||
8
StalwartSimpleLoginMiddleware/Models/KeyMetadata.cs
Normal file
8
StalwartSimpleLoginMiddleware/Models/KeyMetadata.cs
Normal 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; }
|
||||
}
|
||||
7
StalwartSimpleLoginMiddleware/Models/MemberInput.cs
Normal file
7
StalwartSimpleLoginMiddleware/Models/MemberInput.cs
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
namespace StalwartSimpleLoginMiddleware.Models;
|
||||
|
||||
public class MemberInput
|
||||
{
|
||||
public string Email { get; set; }
|
||||
public bool IsExternal { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
namespace StalwartSimpleLoginMiddleware.Models;
|
||||
|
||||
public class NewRandomAliasInput
|
||||
{
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
21
StalwartSimpleLoginMiddleware/Models/NewRandomAliasOutput.cs
Normal file
21
StalwartSimpleLoginMiddleware/Models/NewRandomAliasOutput.cs
Normal 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; }
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
namespace StalwartSimpleLoginMiddleware.Models;
|
||||
|
||||
public class UpdateOwnerEmailInput
|
||||
{
|
||||
public string ApiKey { get; set; }
|
||||
public string OwnerEmail { get; set; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue