mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-11-07 18:04:45 +08:00
调整为多租户模式
This commit is contained in:
42
Infrastructure/AppSetting.cs
Normal file
42
Infrastructure/AppSetting.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
namespace Infrastructure
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置项
|
||||
/// </summary>
|
||||
public class AppSetting
|
||||
{
|
||||
|
||||
public AppSetting()
|
||||
{
|
||||
SSOPassport = "http://localhost:52789";
|
||||
Version = "";
|
||||
UploadPath = "";
|
||||
IdentityServerUrl = "";
|
||||
DbType = Define.DBTYPE_SQLSERVER;
|
||||
}
|
||||
/// <summary>
|
||||
/// SSO地址
|
||||
/// </summary>
|
||||
public string SSOPassport { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 版本信息
|
||||
/// 如果为demo,则屏蔽Post请求
|
||||
/// </summary>
|
||||
public string Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库类型 SqlServer、MySql
|
||||
/// </summary>
|
||||
public string DbType { get; set; }
|
||||
|
||||
/// <summary> 附件上传路径</summary>
|
||||
public string UploadPath { get; set; }
|
||||
|
||||
//identity授权的地址
|
||||
public string IdentityServerUrl { get; set; }
|
||||
|
||||
//是否是Identity授权方式
|
||||
public bool IsIdentityAuth => !string.IsNullOrEmpty(IdentityServerUrl);
|
||||
}
|
||||
}
|
||||
31
Infrastructure/Define.cs
Normal file
31
Infrastructure/Define.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
namespace Infrastructure
|
||||
{
|
||||
public static class Define
|
||||
{
|
||||
public static string USERROLE = "UserRole"; //用户角色关联KEY
|
||||
public const string ROLERESOURCE= "RoleResource"; //角色资源关联KEY
|
||||
public const string USERORG = "UserOrg"; //用户机构关联KEY
|
||||
public const string ROLEELEMENT = "RoleElement"; //角色菜单关联KEY
|
||||
public const string ROLEMODULE = "RoleModule"; //角色模块关联KEY
|
||||
public const string ROLEDATAPROPERTY = "RoleDataProperty"; //角色数据字段权限
|
||||
|
||||
public const string DBTYPE_SQLSERVER = "SqlServer"; //sql server
|
||||
public const string DBTYPE_MYSQL = "MySql"; //sql server
|
||||
|
||||
|
||||
public const int INVALID_TOKEN = 50014; //token无效
|
||||
|
||||
public const string TOKEN_NAME = "X-Token";
|
||||
public const string TENANT_ID = "tenantId";
|
||||
|
||||
|
||||
public const string SYSTEM_USERNAME = "System";
|
||||
public const string SYSTEM_USERPWD = "123456";
|
||||
|
||||
public const string DATAPRIVILEGE_LOGINUSER = "{loginUser}"; //数据权限配置中,当前登录用户的key
|
||||
public const string DATAPRIVILEGE_LOGINROLE = "{loginRole}"; //数据权限配置中,当前登录用户角色的key
|
||||
public const string DATAPRIVILEGE_LOGINORG = "{loginOrg}"; //数据权限配置中,当前登录用户部门的key
|
||||
|
||||
public const string JOBMAPKEY = "OpenJob";
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="9.0.0" />
|
||||
<PackageReference Include="EnyimMemcachedCore" Version="2.1.5" />
|
||||
<PackageReference Include="log4net" Version="2.0.8" />
|
||||
<PackageReference Include="log4net" Version="2.0.12" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
|
||||
Reference in New Issue
Block a user