mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 13:33:13 +00:00
Token
This commit is contained in:
@ -27,16 +27,20 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Esyur.Net.Packets.IIPAuthPacket;
|
||||
|
||||
namespace Esyur.Security.Authority
|
||||
{
|
||||
public class Authentication
|
||||
{
|
||||
AuthenticationType type;
|
||||
|
||||
AuthenticationType type;
|
||||
|
||||
public AuthenticationMethod Method { get; set; }
|
||||
|
||||
public ulong TokenIndex { get; set; }
|
||||
|
||||
public string Username { get; set; }
|
||||
public Certificate Certificate { get; set; }
|
||||
public Certificate Certificate { get; set; }
|
||||
public string Domain { get; set; }
|
||||
|
||||
public string FullName => Username + "@" + Domain;
|
||||
|
14
Esyur/Security/Authority/AuthenticationMethod.cs
Normal file
14
Esyur/Security/Authority/AuthenticationMethod.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Esyur.Security.Authority
|
||||
{
|
||||
public enum AuthenticationMethod : byte
|
||||
{
|
||||
None,
|
||||
Certificate,
|
||||
Credentials,
|
||||
Token
|
||||
}
|
||||
}
|
@ -35,40 +35,14 @@ using Esyur.Resource;
|
||||
|
||||
namespace Esyur.Security.Membership
|
||||
{
|
||||
public interface IMembership:IResource
|
||||
public interface IMembership : IResource
|
||||
{
|
||||
//IUser[] GetUsers(QueryFilter<string> user);
|
||||
|
||||
//bool AddCertificate(Certificate certificate);
|
||||
|
||||
//CACertificate[] GetCACertificates(string authority);
|
||||
//UserCertificate[] GetUserCertificate(string user, string domain);
|
||||
//DomainCertificate[] GetDomainCertificates(string domain);
|
||||
|
||||
|
||||
AsyncReply<bool> UserExists(string username, string domain);
|
||||
AsyncReply<byte[]> GetPassword(string username, string domain);
|
||||
AsyncReply<byte[]> GetToken(ulong TokenIndex, string domain);
|
||||
AsyncReply<bool> Login(Session session);
|
||||
AsyncReply<bool> Logout(Session session);
|
||||
|
||||
//ClientAuthentication Authenticate(string username, byte[] credentials, int flag);
|
||||
//HostAuthentication Authenticate(DomainCertificate domainCertificate);
|
||||
//CoHostAuthentication Authenticate(DomainCertificate hostCertificate, int hostId);
|
||||
|
||||
/*
|
||||
object GetUserInfo(User user, string field);
|
||||
object[] GetUserInfo(User user, string[] fields);
|
||||
|
||||
bool SetUserInfo(User user, string field, object value);
|
||||
bool SetUserInfo(User user, KeyList<string, object> info);
|
||||
*/
|
||||
|
||||
//bool AddUser(User user, KeyList<string, object> info);
|
||||
//bool RemoveUser(string username);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AsyncReply<string> TokenExists(ulong tokenIndex, string domain);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user