mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-06-13 14:38:43 +00:00
Protocol Phase 1 (Auth)
This commit is contained in:
@@ -7,24 +7,25 @@ using System.Text;
|
||||
|
||||
namespace Esiur.Tests.Functional
|
||||
{
|
||||
internal class ServerAuthenticationProvider: PasswordAuthenticationProvider
|
||||
internal class ServerAuthenticationProvider : PasswordAuthenticationProvider
|
||||
{
|
||||
public override (byte[], byte[]) GetHostedAccountCredential(string identity, string domain)
|
||||
public override PasswordHash GetHostedAccountCredential(string identity, string domain)
|
||||
{
|
||||
if (identity == "tester" && domain == "test")
|
||||
return (new byte[] { 1, 2, 3, 4, 5 }, new byte[] { 6, 7, 8, 9, 10 });
|
||||
return new PasswordHash(PasswordAuthenticationHandler.ComputeSha3(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }),
|
||||
new byte[] { 6, 7, 8, 9, 10 });
|
||||
else
|
||||
return (null, null);
|
||||
return new PasswordHash(null, null);
|
||||
}
|
||||
|
||||
public override byte[] GetSelfCredential(string identity, string domain, string hostname)
|
||||
{
|
||||
return base.GetSelfCredential(identity, domain, hostname);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override (string, byte[]) GetSelfIdentityAndCredential(string domain, string hostname)
|
||||
public override IdentityPassword GetSelfIdentityAndCredential(string domain, string hostname)
|
||||
{
|
||||
return base.GetSelfIdentityAndCredential(domain, hostname);
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override AsyncReply<bool> Login(Session session)
|
||||
|
||||
Reference in New Issue
Block a user