RT.MesWeb.Authentication
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package RT.MesWeb.Authentication --version 1.0.0
NuGet\Install-Package RT.MesWeb.Authentication -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RT.MesWeb.Authentication" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RT.MesWeb.Authentication" Version="1.0.0" />
<PackageReference Include="RT.MesWeb.Authentication" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RT.MesWeb.Authentication --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RT.MesWeb.Authentication, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RT.MesWeb.Authentication@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RT.MesWeb.Authentication&version=1.0.0
#tool nuget:?package=RT.MesWeb.Authentication&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Authentication 使用说明
配置要求
- 需要在
appsettings.json中添加以下配置:
{
"ConnectionStrings": {
"AuthEntities": "Server=127.0.0.1;uid=sa;pwd=password;database=dbname;Trust Server Certificate=true;",
},
"Authentication": {
"AdminRoleName": "administrator",
"AdminUserName": "admin",
"DefaultPassword": "mes123",
"AccessControl": {
"AllowMultiTerminal": false,
"SessionTimeoutSeconds": 200,
"HeartbeatIntervalSeconds": 60,
"Lockout": {
"MaxFailedAccessAttempts": 5,
"DefaultLockoutMinutes": 30,
"InactiveDaysToLock": 90
},
"PasswordPolicy": {
"ExpiryDays": 180,
"ReminderDaysBeforeExpiry": 7,
"RequiredLength": 8,
"ComplexityRegex": "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$",
"AllowRepeatWithLast": false
}
}
},
}
数据库要求
- AuthEntities指向的数据库应当全套权限认证体系的数据表
- AuthEntities指向的数据库应当包含以下序列:
- AUTH_SEQ_NO:用于生成数据表编号的序列。
- 数据库中应包含序号生成机制
- SQL Server:应包含生成Sequence的存储过程和Sequence序列对象
- Oracle:包含生成Sequence的序列对象即可
使用说明
- 应用程序构建时应调用以下方法:
// 在应用程序构建前调用以下方法以注册审计服务
services.ConfigureAudit(configuration);
// 在应用程序构建后调用以下方法以启用审计功能
app.ConfigureAudit();
- AuthEntities需要在主工程内进行依赖注入:
services.AddDbContext<AuthEntities>(
o => o.UseSqlServer(configuration.GetConnectionString("AuthEntities")));
- Authentication有授权检查,需要在主工程内启动授权服务(授权配置参见RT.MesWeb.Framework中的README):
MesLicenseChecker.Current.Start(configuration, hostEnvironment.ContentRootPath, logger);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Audit.Mvc.Core (>= 30.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.15)
- Oracle.EntityFrameworkCore (>= 9.23.60)
- RT.MesWeb.Audit (>= 1.0.0)
- RT.MesWeb.Framework (>= 1.0.0)
- RT.MesWeb.Redis (>= 1.0.0)
-
net8.0
- Audit.Mvc.Core (>= 30.0.0)
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.15)
- Oracle.EntityFrameworkCore (>= 9.23.60)
- RT.MesWeb.Audit (>= 1.0.0)
- RT.MesWeb.Framework (>= 1.0.0)
- RT.MesWeb.Redis (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.