NXDO.Data.Security
2.2.6080
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 NXDO.Data.Security --version 2.2.6080
NuGet\Install-Package NXDO.Data.Security -Version 2.2.6080
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="NXDO.Data.Security" Version="2.2.6080" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add NXDO.Data.Security --version 2.2.6080
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: NXDO.Data.Security, 2.2.6080"
#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.
// Install NXDO.Data.Security as a Cake Addin #addin nuget:?package=NXDO.Data.Security&version=2.2.6080 // Install NXDO.Data.Security as a Cake Tool #tool nuget:?package=NXDO.Data.Security&version=2.2.6080
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
简述
安全执行防护权限集<br/> 提供 AspNet.Core NET6 下 Membership,Roles
示例
简单示例
NXDO.Data.Security.Membership 下的方法使用
NXDO.Data.Security.Roles 下的方法使用
//具体如何使用,请参见 dotnet4.0 web下的 Membership,Roles 方法
配置
成员资格
{
"membership": {
"defaultProvider": "dbMembershipProvider",
"providers": [ "blurMembershipProvider", "dbMembershipProvider" ], //ldapMembershipProvider netcore 未移植 n4.0
"blurMembershipProvider": {
"type": "NXDO.Data.Security.BlurMembershipProvider, NXDO.Data.Security.N6",
"usedClient": false, //提供,但已弃用 WCF的Client标识
"applicationName": "xxx", //可缺省
"maxInvalidPasswordAttempts": 3, //登录时密码尝试的验证次数
"passwordAttemptWindow": 10, //登录时密码尝试的验证时效(分钟),尝试次数失败后记录时间,并在多少分钟后可以再次登录
"minRequiredNonAlphanumericCharacters": 1, //最少特殊字符数,用于产生随机密码。特殊字符数为 !@#$%^&*()_-+=[{]};:>|./?
"minRequiredPasswordLength": 6, //密码最小长度
"passwordFormat": "Clear", //Clear:不对密码进行加密存储。Hashed:SHA1哈希算法对密码进行单向加密存储(目前不支持)。 Encrypted:不支持(asp.net 架构不是 asp.net core 的)
"passwordStrengthRegularExpression": "",
"enablePasswordReset": true, //密码重置,自动生成随机密码(minRequiredPasswordLength,minRequiredNonAlphanumericCharacters)此参数相关
"enablePasswordRetrieval": true, //允许搜索密码
"requiresQuestionAndAnswer": false,
"requiresUniqueEmail": false
},
"dbMembershipProvider": {
"type": "NXDO.Data.Security.DbMembershipProvider, NXDO.Data.Security.N6",
"userOrmAssembly": "NXDO.ATestWeb.AUser, NXDO.ATestWeb",
"userOrmAnswerName": "",
"userOrmActiveName": "IsActived=1",
"userOrmUnActiveName": "IsActived=0",
"userOrmPasswordName": "Password",
"userOrmDefaultValue": "UserName='';UserId=0;Sex=false",
//"UserName=UName;ProviderUserKey=UserID;Email,PasswordQuestion;Comment;IsApproved;IsLockedOut;CreationDate;LastLoginDate=Birthday;LastActivityDate;LastPasswordChangedDate;LastLockoutDate"
"userOrmPropertyMap": {
"UserName": "UserName",
"ProviderUserKey": "UserId",
"PasswordQuestion": "",
"Comment": "",
"IsApproved": "",
"IsLockedOut": "",
"CreationDate": "",
"LastLoginDate": "",
"LastActivityDate": "",
"LastPasswordChangedDate": "",
"LastLockoutDate": ""
}
}
}
}
角色管理
{
"roleManager": {
"enabled": true,
"cacheRolesInCookie": false,
"cookieName": ".ASPROLES",
"cookieTimeout": 1,
"cookiePath": "/",
"cookieRequireSSL": false,
"cookieSlidingExpiration": true,
"cookieProtection": "All",
"defaultProvider": "dbRoleProvider",
"providers": [ "blurRoleProvider", "dbRoleProvider" ],
"blurRoleProvider": {
"type": "NXDO.Data.Security.BlurRoleProvider, NXDO.Data.Security.N6",
"applicationName": "NXDO.ATest",
"usedClient": false, //提供,但已弃用
"activeDataHold": false,
"roleOrmAssembly": "NXDO.ATestWeb.ARole, NXDO.ATestWeb.dll",
"roleOrmRoleName": "RoleName",
"roleOrmDefaultValue": "",
"roleOrmValueName": "RoleValue",
"roleOrmAdminName": "IsAdmin",
"roleOrmSafeOfficerName": "IsSO",
"roleOrmSafeAuditorName": "IsSA"
},
"dbRoleProvider": {
"type": "NXDO.Data.Security.DbRoleProvider, NXDO.Data.Security.N6",
"userOrmAssembly": "NXDO.ATestWeb.AUser, NXDO.ATestWeb",
"userOrmUserName": "UserName",
"roleOrmPropertyMap": {
"RoleId": "RoleId" //键:role的,值:用户的
}
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on NXDO.Data.Security:
Package | Downloads |
---|---|
NXDO.WebAPI.ZhuBird
朱雀,亦称朱鸟,形体似凤凰,古代神话中的南方之神。Rosefinch, also known as "Zhu bird" physical may Phoenix, the ancient Chinese myth of the God of the South. |
|
NXDO.WebAPI
NCore WebHost MicroServices & WebApi & WebVUE |
GitHub repositories
This package is not used by any popular GitHub repositories.
增加了处理3员相关日志实体。