MicroCloud.Identity
7.2.0.2
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 MicroCloud.Identity --version 7.2.0.2
NuGet\Install-Package MicroCloud.Identity -Version 7.2.0.2
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="MicroCloud.Identity" Version="7.2.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroCloud.Identity --version 7.2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MicroCloud.Identity, 7.2.0.2"
#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 MicroCloud.Identity as a Cake Addin #addin nuget:?package=MicroCloud.Identity&version=7.2.0.2 // Install MicroCloud.Identity as a Cake Tool #tool nuget:?package=MicroCloud.Identity&version=7.2.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MicroCloud 身份认证组件
说明
MicroCloud 身份认证组件,基于 AspNetCore.Identity 和 MicroCloud数据仓储系统 的身份认证实现。
功能结构
- MicroCloud.Identity
- 身份认证Authentication
- 实现用户Claims提供器
IUserClaimsProvider
- Cookie
- 实现Cookie登录,并刷新在线用户信息
- JwtBearer
- 实现 Jwt Token 的构建功能
- 实现 Jwt Token 的刷新机制
- OAuth2
- 实现
微信
、钉钉
、抖音
、QQ
、Microsoft
、Github
三方登录功能
- 实现
- 实现用户Claims提供器
- 身份标识Identity
- 实现用户数据管理功能,以及
用户角色
、用户组织机构
的绑定管理 - 实现角色数据管理功能,以及
用户角色
、角色组织机构
的绑定管理 - 实现组织机构数据树形管理功能,实现用户登录组织及部门,可用于后续的数据权限处理
- 重写UserStore,RoleStore,使用现有IRepository进行数据存储
- 实现第三方OAuth2认证系统的整合
- 在线用户信息缓存系统,实现用户信息刷新
- 实现用户数据管理功能,以及
- 身份认证Authentication
用法
- 通过nuget引用
MicroCloud.Identity
程序集
Install-Package MicroCloud.Identity
- 在
appsettings.json
中 的MicroCloud
节点下添加如下配置节点
{
//第三方OAuth2登录
"OAuth2": {
//微信
"WeChat": {
"ClientId": "你的微信AppId",
"ClientSecret": "你的微信AppKey",
"Enabled": true //是否启用
},
//钉钉
"DingTalk": {
"ClientId": "你的钉钉AppId",
"ClientSecret": "你的钉钉AppKey",
"Enabled": true //是否启用
},
//抖音
"TikTok": {
"ClientId": "你的抖音AppID",
"ClientSecret": "你的抖音AppKey",
"Enabled": true //是否启用
},
//腾讯QQ
"QQ": {
"ClientId": "你的QQ互联项目AppId",
"ClientSecret": "你的QQ互联项目AppKey",
"Enabled": false //是否启用
},
//微软账户
"Microsoft": {
"ClientId": "你的微软项目ClientId",
"ClientSecret": "你的微软项目ClientSecret",
"Enabled": false //是否启用
},
//GitHub账户
"GitHub": {
"ClientId": "你的GitHub项目ClientId",
"ClientSecret": "你的GitHub项目ClientSecret",
"Enabled": false //是否启用
}
},
//JWT身份认证选项
"Jwt": {
"Issuer": "MicroCloud by seonsoft", //发行方
"Audience": "MicroCloud clients audience", //订阅方
"Secret": "{26289316-2BE5-4500-8925-71DDBBB86E5E}", //密钥
"AccessExpireMins": 15, //15分钟 //AccessToken有效期分钟数
"RefreshExpireMins": 10080, // 7天 //RefreshToken有效期分钟数
"IsRefreshAbsoluteExpired": false, //RefreshToken是否绝对过期
"Enabled": true //是否启用
},
//Cookie身份认证选项
"Cookie": {
"CookieName": "Cookie名称", //Cookie名称
"LoginPath": "登录地址", //登录地址
"LogoutPath": "登出地址", //登出地址
"AccessDeniedPath": "无权限地址", //无权限地址
"ReturnUrlParameter": "返回Url参数名,默认为 ReturnUrl", //返回Url参数名,默认为 ReturnUrl
"ExpireMins": 5, //过期分钟数
"SlidingExpiration": true, //是否滑动过期
"Enabled": false //是否启用
},
}
交流
QQ群号:863605868 | 微信号:SeonHu |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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 was computed. 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.
-
net7.0
- Authentication.GitHub.Core (>= 1.0.0)
- MicroCloud.AspNetCore (>= 7.2.0.2)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on MicroCloud.Identity:
Package | Downloads |
---|---|
MicroCloud.Authorization.Functions
MicroCloud 功能权限组件,API功能权限的设计实现。 |
|
MicroCloud.Pack.Identity
MicroCloud 身份认证模块,封装基于 MicroCloud 身份认证组件的功能实现。 |
|
MicroCloud.Authorization.Datas
MicroCloud 数据权限组件,对应用中数据权限进行授权的设计实现。 |
|
MicroCloud.Report
MicroCloud 报表组件,封装 FastReport.OpenSource 的报表处理功能。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
8.0.3.1 | 165 | 9/9/2024 |
8.0.2.9 | 180 | 9/5/2024 |
8.0.2.8 | 168 | 8/31/2024 |
8.0.2.7 | 187 | 8/31/2024 |
8.0.2.6 | 185 | 8/21/2024 |
8.0.2.5 | 191 | 8/21/2024 |
8.0.2.4 | 170 | 8/12/2024 |
8.0.2.3 | 173 | 8/8/2024 |
8.0.2.2 | 167 | 7/14/2024 |
8.0.2.1 | 161 | 6/7/2024 |
8.0.1.9 | 164 | 6/6/2024 |
8.0.1.8 | 163 | 6/6/2024 |
8.0.1.7 | 174 | 5/15/2024 |
8.0.1.6 | 127 | 5/15/2024 |
8.0.1.5 | 135 | 5/15/2024 |
8.0.1.4 | 127 | 5/14/2024 |
8.0.1.3 | 133 | 5/10/2024 |
8.0.1.2 | 173 | 5/8/2024 |
8.0.1.1 | 182 | 5/7/2024 |
8.0.0.9 | 179 | 5/1/2024 |
8.0.0.8 | 174 | 5/1/2024 |
8.0.0.7 | 185 | 4/30/2024 |
8.0.0.5 | 187 | 4/19/2024 |
8.0.0.4 | 168 | 4/18/2024 |
8.0.0.3 | 199 | 4/15/2024 |
8.0.0.2 | 220 | 4/12/2024 |
8.0.0.1 | 175 | 4/12/2024 |
7.2.0.8 | 197 | 4/12/2024 |
7.2.0.7 | 183 | 4/12/2024 |
7.2.0.6 | 181 | 4/12/2024 |
7.2.0.5 | 176 | 4/12/2024 |
7.2.0.4 | 194 | 4/11/2024 |
7.2.0.2 | 244 | 4/7/2024 |
7.2.0.1 | 400 | 10/26/2023 |
7.1.2.9 | 200 | 11/7/2023 |
7.1.2.8 | 262 | 10/19/2023 |
7.1.2.7 | 224 | 10/19/2023 |
7.1.2.6 | 260 | 10/18/2023 |
7.1.2.5 | 267 | 9/20/2023 |
7.1.2.4 | 253 | 9/13/2023 |
7.1.2.3 | 250 | 9/13/2023 |
7.1.2.2 | 278 | 9/12/2023 |
7.1.2.1 | 252 | 9/4/2023 |
7.1.1.9 | 339 | 8/31/2023 |
7.1.1.6 | 288 | 8/29/2023 |
7.1.1.5 | 251 | 8/25/2023 |
7.1.1.4 | 275 | 8/25/2023 |
7.1.1.3 | 259 | 8/25/2023 |
7.1.1.2 | 245 | 8/24/2023 |
7.1.1.1 | 293 | 8/24/2023 |
7.0.3.1 | 319 | 8/24/2023 |
7.0.2.6 | 291 | 5/11/2023 |
7.0.1.7 | 293 | 5/9/2023 |
7.0.1.6 | 283 | 5/9/2023 |
7.0.1.4 | 325 | 4/24/2023 |
7.0.1.3 | 318 | 4/19/2023 |
7.0.1.2 | 340 | 4/19/2023 |
7.0.1.1 | 221 | 4/19/2023 |
7.0.0.9 | 309 | 4/18/2023 |
7.0.0.8 | 319 | 4/17/2023 |
7.0.0.7 | 379 | 4/12/2023 |
7.0.0.6 | 364 | 4/8/2023 |
7.0.0.5 | 351 | 4/7/2023 |
7.0.0.4 | 370 | 4/7/2023 |
7.0.0.3 | 371 | 4/7/2023 |