带有引导程序4和本地化的ASP.NET Core sidentityserver4身份模板
更改日志
特征
- ASP.NET核心6
- 最新的ASP.NET核心身份
- Bootstrap 4 UI
- 本地化En-us,de-de,it-it,fr-fr,zh–hans,es-mx,de-ch,ga-ie,gsw-ch
- 2FA
- TOTP
- FIDO2 MFA
- 个人数据,下载,删除(身份的一部分)
- Azure AD,CERT,关键保险库部署API
- SendGrid电子邮件API
- NPM带有bundleconfig用于前端软件包
- EF核心
- 使用OIDC登录对UI_LOCALES的支持
一些打印屏幕:
它
de-de
En-us
fr
ZH-HANS
使用模板
安装
来自Nuget:
dotnet new -i IdentityServer4AspNetCoreIdentityTemplate
本地建造的Nupkg:
dotnet new -i IdentityServer4AspNetCoreIdentityTemplate .6.0.1.nupkg
本地文件夹:
dotnet new -i <PATH>
其中<PATH>是包含.template.config文件夹的路径。
跑步
dotnet new sts -n YourCompany.Sts
使用-n或--name参数更改创建的输出的名称。该字符串还用于将.CS文件中的名称名称替换为项目。
设置,使用系统的应用程序
- 将EF核心代码从SQLITE更改为您所需的数据库
- 根据需要更改Applicationuser类,删除/添加属性
- 添加迁移并创建数据库
- 定义部署URL,创建证书,然后在您的应用程序中使用它们(启动,配置文件)
- 根据需要添加外部提供商以登录,或删除
- 删除不需要的UI视图
- 添加删除资源文件本地化以及在启动中。
- 将客户端配置添加到config.cs类(开发,测试,分期,产品或其他)
- 更新IdentityWithAdditionAlclaimSprofileService中的索赔
- 根据需要添加安全标头,CSP,IFRAME,XSS,HSTS,…
- 如果您在多实例环境中部署,请使用IdentityServer4.entityFramework Nuget软件包将会话数据添加到数据库中
- 将“ azure_tenant_id”添加到启动设置中,以使用Azure密钥保险库证书进行测试
卸载
dotnet new -u IdentityServer4AspNetCoreIdentityTemplate
发展
建造
https://docs.m**icros*oft.com/en-us/dotnet/core/tutorials/create-custom-template
nuget pack content/ IdentityServer4AspNetCoreIdentityTemplate .nuspec
dotnet迁移
在项目文件夹中打开CMD:
dotnet restore
dotnet ef migrations add sts_init --context ApplicationDbContext --verbose
dotnet ef database update --verbose
使用PowerShell创建自签名证书:
New-SelfSignedCertificate -DnsName \"sts.dev.cert.com\", \"sts.dev.cert.com\" -CertStoreLocation \"cert:\\LocalMachine\\My\"
$mypwd = ConvertTo-SecureString -String \"1234\" -Force -AsPlainText
Get-ChildItem -Path cert:\\localMachine\\my\\\"The thumbprint...\" | Export-PfxCertificate -FilePath C:\\git\\sts_dev_cert.pfx -Password $mypwd
积分,使用的Nuget软件包 + ASP.NET Core 3.1标准软件包
- IdentityServer4
- 身份证4.apnetidentity
- azure.security.keyvault.secrets
- Microsoft.IdentityModel.Clients.ActiveDirectory
- sendgrid
- netescapades.aspnetcore.securityheaders
- Serilog
链接
http://docs.sideit*yse*rve*r.io/en/release/
https://**git*hub.com/indistityserver/indistityserver4
https://get**boo*tstrap.com/
https://*node*js.o*rg/en/
https://www.n*pmj**s.com/
