mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-10-24 03:50:57 +00:00
Esiur CLI
This commit is contained in:
1 parent
3e8fb50110
commit
ac36a3ddc7
36 files changed
+2396
-304
No files matched your search
@@ -0,0 +1,17 @@
|
||||
using Esiur.Core;
|
||||
using Esiur.Security.Authority;
|
||||
using Esiur.Security.Authority.Providers;
|
||||
|
||||
namespace Esiur.CLI.Client;
|
||||
|
||||
internal sealed class PasswordClientProvider(string identity, byte[] password) : PasswordAuthenticationProvider
|
||||
{
|
||||
public override byte[] GetSelfCredential(string requestedIdentity, string domain, string hostname) =>
|
||||
string.Equals(requestedIdentity, identity, StringComparison.Ordinal) ? password : null!;
|
||||
|
||||
public override IdentityPassword GetSelfIdentityAndCredential(string domain, string hostname) =>
|
||||
new() { Identity = identity, Password = password };
|
||||
|
||||
public override AsyncReply<bool> Login(Session session) => new(true);
|
||||
public override AsyncReply<bool> Logout(Session session) => new(true);
|
||||
}
|
||||
Reference in new issue
Block a user