RuoVea.OmiApi.UserRole
10.0.0
dotnet add package RuoVea.OmiApi.UserRole --version 10.0.0
NuGet\Install-Package RuoVea.OmiApi.UserRole -Version 10.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="RuoVea.OmiApi.UserRole" Version="10.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RuoVea.OmiApi.UserRole" Version="10.0.0" />
<PackageReference Include="RuoVea.OmiApi.UserRole" />
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 RuoVea.OmiApi.UserRole --version 10.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: RuoVea.OmiApi.UserRole, 10.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 RuoVea.OmiApi.UserRole@10.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=RuoVea.OmiApi.UserRole&version=10.0.0
#tool nuget:?package=RuoVea.OmiApi.UserRole&version=10.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
RuoVea.OmiApi.UserRole
介绍:
用户角色 API
用户角色API(RuoVea.OmiApi.UserRole):基于.Net5.0 、.Net6.0 、.Net7.0、.net10.0构建的简单、跨平台的系统。 系统业务简单、代码清晰,如果您只是单纯只需简单增、删、改、查。没有多余的功能,简单扩展下基本可以满足日常需求。 支持的数据库有 MySql、SqlServer、PostgreSQL、SQLite、Oracle...
安装教程
Install-Package RuoVea.OmiApi.Auth
/*类库映射API组件*/
if (builder.Environment.IsProduction())
{
builder.Services.AddDynamicWebApi(options =>
{
options.DefaultApiPrefix = "/openapi/api";
options.RemoveControllerPostfixes = new List<string> { "AppService", "Service" };
options.RemovePrefix = new List<string> { "get", "post" };
});
}
else
{
builder.Services.AddDynamicWebApi(options =>
{
options.RemoveControllerPostfixes = new List<string> { "AppService", "Service" };
options.RemovePrefix = new List<string> { "get", "post" };
});
}
builder.Services.AddOmiSystemSetup();
builder.Services.AddHttpContextSetup<AspNetUser>();
builder.Services.AddAuthenticationSetup(IdentifyEnum.Jwt, true);
builder.Services.AddSqlSugarSetup();
builder.Services.AddSystemInitSetup();
builder.Services
.RequestActionSetup() // 注入 请求日志拦截 [执行操作日志、参数验证 ]
.ResultSetup()
.ExceptionSetup();
builder.Services.AddSwaggerSetup();
#region 跨域
// 跨域
//services.CorsUrls();
builder.Services.AddCors(option =>
{
option.AddDefaultPolicy(builder =>
{
builder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod();
});
});
#endregion
app
app.UseCors();
app.UseAuthentication();
app.UseAuthorization();
配置信息
/* Jwt配置 */
"Jwt": {
"ValidateIssuerSigningKey": true, // 是否验证密钥,bool 类型,默认true
"IssuerSigningKey": "3c1cbc3f546eda35168c3aa3cb91780fbe703f0996c6d123ea96dc85c70bbc0a", // 密钥,string 类型,必须是复杂密钥,长度大于16
"ValidateIssuer": true, // 是否验证签发方,bool 类型,默认true
"ValidIssuer": "SecurityDemo.Authentication.JWT", // 签发方,string 类型
"ValidateAudience": true, // 是否验证签收方,bool 类型,默认true
"ValidAudience": "jwtAudience", // 签收方,string 类型
"ValidateLifetime": true, // 是否验证过期时间,bool 类型,默认true,建议true
"ExpiredTime": 1440, // 过期时间,long 类型,单位分钟,默认1440分钟(24小时)
"ClockSkew": 5 // 过期时间容错值,long 类型,单位秒,默认5秒
},
/* 数据库链接 具体配置见SqlSugar官网(第一个为默认库不需要设置ConfigId)*/
"ConnectionConfigs": [
{
"DbType": "Sqlite", /*MySql、SqlServer、Sqlite、Oracle、PostgreSQL、Dm、Kdbndp、Oscar、MySqlConnector、Access、OpenGauss、QuestDB、HG、ClickHouse、GBase、Odbc、Custom */
"ConnectionString": "DataSource=./ruovea.db", /*库连接字符串*/
//"EnableUnderLine": false, /*启用驼峰转下划线*/
//"EnableDiffLog": false, /*启用库表差异日志*/
//"IsEncrypt": false, /*是否加密*/
//"DbSecurity": "", /*链接字符串解密密钥*/
//"IsDeleteFilter": true, /*查询删除过滤 实体需继承 IDeletedEntity*/
//"IsUserIdFilter": false, /*查询过滤器默认为false,true的时候;当有用户cretor的时候将及时过滤 实体需继承ICreatorFilter或EntityBase*/
//"IsTenantIdFilter": false, /*查询过滤器 默认为false,true的时候;当有用户cretor的时候将及时过滤 实体需继承 ITenantIdFilter*/
//"CommandTimeOut": 30 /*设置 SQL 执行的超时时间(默认30)分钟 */
}
]
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- RuoVea.DynamicWebApi (>= 10.0.0)
- RuoVea.ExFilter (>= 10.0.0.3)
- RuoVea.ExJwtBearer (>= 10.0.0.2)
- RuoVea.ExPws (>= 10.0.0.1)
- RuoVea.ExSugar (>= 10.0.0.5)
- RuoVea.OmiApi.Config (>= 10.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on RuoVea.OmiApi.UserRole:
| Package | Downloads |
|---|---|
|
RuoVea.OmiUserRole
用户角色管理 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 93 | 1/27/2026 |
| 9.0.0 | 99 | 1/27/2026 |
| 8.0.1.14 | 113 | 1/27/2026 |
| 8.0.1.13 | 112 | 1/13/2026 |
| 8.0.1.12 | 112 | 1/13/2026 |
| 8.0.1.11 | 222 | 11/25/2025 |
| 8.0.1.10 | 374 | 11/21/2025 |
| 8.0.1.9 | 223 | 11/6/2025 |
| 7.0.1.14 | 115 | 1/27/2026 |
| 7.0.1.13 | 109 | 1/13/2026 |
| 7.0.1.12 | 111 | 1/13/2026 |
| 7.0.1.11 | 210 | 11/25/2025 |
| 7.0.1.10 | 368 | 11/21/2025 |
| 7.0.1.9 | 219 | 11/6/2025 |
| 6.0.2.14 | 118 | 1/27/2026 |
| 6.0.2.13 | 111 | 1/13/2026 |
| 6.0.2.12 | 113 | 1/13/2026 |
| 6.0.2.11 | 223 | 11/25/2025 |
| 6.0.2.10 | 377 | 11/21/2025 |
| 6.0.2.9 | 225 | 11/6/2025 |
Loading failed