2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-04-29 06:48:41 +00:00
This commit is contained in:
2026-04-16 15:08:42 +03:00
parent b45c205d12
commit f5a9651901
8 changed files with 97 additions and 4 deletions
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Security.Authority
{
public class AuthenticationContext
{
public AuthenticationMode Mode { get; }
public string? LocalDomain { get; }
public string? RemoteDomain { get; }
public string? LocalHost { get; }
public string? RemoteHost { get; }
//public AuthenticationComponentContext LocalToRemote { get; } = new();
//public AuthenticationComponentContext RemoteToLocal { get; } = new();
}
}
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Security.Authority
{
public enum AuthenticationProtocol
{
Hash = 0,
PPAP = 1,
}
}
@@ -0,0 +1,16 @@
//using System;
//using System.Collections.Generic;
//using System.Text;
//namespace Esiur.Security.Authority
//{
// public interface IAuthenticationMethodProvider
// {
// string Method { get; }
// bool CanHandle(AuthenticationCreationContext context);
// IAuthenticator CreateAuthenticator(AuthenticationCreationContext context);
// }
//}
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Security.Authority
{
public sealed class InitiatorAuthenticationContext
{
public string LocalIdentity { get; } = string.Empty;
public string RemoteIdentity { get; } = string.Empty;
public string? RemoteDomain { get; }
public string? LocalDomain { get; }
public string? RemoteIpAddress { get; }
public AuthenticationMode Mode { get; }
}
}
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Security.Authority
{
public sealed class ResponderAuthenticationContext
{
public string? RemoteIpAddress { get; }
public string? LocalDomain { get; }
public AuthenticationMode Mode { get; }
public IReadOnlyDictionary<string, string> Headers { get; }
= new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
}
}
@@ -37,6 +37,8 @@ namespace Esiur.Security.Membership;
public interface IMembership
{
public IAuthenticationHandler GetAuthenticationHandler(string domain);
public event ResourceEventHandler<AuthorizationIndication> Authorization;
AsyncReply<string> UserExists(string username, string domain);