ComplianceServer/oldcode/Security/ClientKey.cs

52 lines
1.4 KiB
C#

using System.Collections.Generic;
using System.Linq;
namespace WX.Interface.Security
{
public sealed class ClientKey
{
private ClientKey(string _Id, string _Name, string _AccessKey)
{
Id = _Id;
Name = _Name;
AccessKey = _AccessKey;
}
public string Id
{
get;
private set;
}
public string Name
{
get;
private set;
}
public string AccessKey
{
get;
private set;
}
private static List<ClientKey> clientList;
static ClientKey()
{
clientList = new List<ClientKey>();
clientList.Add(new ClientKey("UPWEBSITE", "UP网站", "1622a92d"));
clientList.Add(new ClientKey("TDORDERSITE", "订单接口", "622a92d1"));
clientList.Add(new ClientKey("UPPRODUCT", "UP产品端", "c268a2cd"));
clientList.Add(new ClientKey("gd_crm", "UPCRM", "upchina."));
clientList.Add(new ClientKey("nj_crm", "UPCRM", "pchina.1"));
clientList.Add(new ClientKey("AYCRM2_CTI", "CTI", "ac910f51"));
clientList.Add(new ClientKey("WX_EXT", "企微相关外部链接", "dwj5rc8x"));
}
public static ClientKey GetClientKey(string clientId)
{
return clientList.FirstOrDefault(obj => obj.Id == clientId);
}
}
}