• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

damienbod/IdentityServer4AspNetCoreIdentityTemplate: An ASP.NET Core 6.0 Identit ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

damienbod/IdentityServer4AspNetCoreIdentityTemplate

开源软件地址(OpenSource Url):

https://github.com/damienbod/IdentityServer4AspNetCoreIdentityTemplate

开源编程语言(OpenSource Language):

C# 44.3%

开源软件介绍(OpenSource Introduction):

An ASP.NET Core IdentityServer4 Identity Template with Bootstrap 4 and Localization

.NET NuGet Status Change log

Features

  • ASP.NET Core 6
  • Latest ASP.NET Core Identity
  • Bootstrap 4 UI
  • Localization en-US, de-DE, it-IT, fr-FR, zh-Hans, es-MX, de-CH, ga-IE, gsw-CH
  • 2FA
  • TOTP
  • FIDO2 MFA
  • Personal data, download, delete (part of Identity)
  • Azure AD, Cert, key vault deployments API
  • SendGrid Email API
  • npm with bundleconfig used for frontend packages
  • EF Core
  • Support for ui_locales using OIDC logins

some print screens:

it-IT

it-IT

de-DE

de-DE

en-US

en-US

fr-FR

fr-FR

zh-Hans

zh-Hans

Using the template

install

From NuGet:

dotnet new -i IdentityServer4AspNetCoreIdentityTemplate

Locally built nupkg:

dotnet new -i IdentityServer4AspNetCoreIdentityTemplate.6.0.1.nupkg

Local folder:

dotnet new -i <PATH>

Where <PATH> is the path to the folder containing .template.config.

run

dotnet new sts -n YourCompany.Sts

Use the -n or --name parameter to change the name of the output created. This string is also used to substitute the namespace name in the .cs file for the project.

Setup, Using the application for your System

  • Change the EF Core code from SQLite to your required database
  • Change the ApplicationUser class as required, remove/add the properties
  • Add the migrations and create the database
  • Define the deployment URLs, create the certs, and use these in your application (Startup, config files)
  • Add the external providers for login as required, or remove
  • Remove the UI views which are not required
  • Add remove the resource file localizations and also in the Startup.
  • Add the client configuration to the Config.cs class (dev, test, staging, prod, or whatever)
  • Update the claims in the IdentityWithAdditionalClaimsProfileService
  • Add the security headers as required, CSP, IFrame, XSS, HSTS, ...
  • If you deploy in a multi instance environment, add the session data to a database using the IdentityServer4.EntityFramework NuGet package
  • Add "AZURE_TENANT_ID": "your-tenandId" to the launch settings to test in VS with Azure Key Vault certificates

uninstall

dotnet new -u IdentityServer4AspNetCoreIdentityTemplate

Development

build

https://docs.microsoft.com/en-us/dotnet/core/tutorials/create-custom-template

nuget pack content/IdentityServer4AspNetCoreIdentityTemplate.nuspec

dotnet Migrations

open the cmd in project folder:

dotnet restore

dotnet ef migrations add sts_init --context ApplicationDbContext --verbose

dotnet ef database update  --verbose

Using Powershell to create the self signed certs:

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

Credits, Used NuGet packages + ASP.NET Core 3.1 standard packages

  • IdentityServer4
  • IdentityServer4.AspNetIdentity
  • Azure.Security.KeyVault.Secrets
  • Microsoft.IdentityModel.Clients.ActiveDirectory
  • Sendgrid
  • NetEscapades.AspNetCore.SecurityHeaders
  • Serilog

Links

http://docs.identityserver.io/en/release/

https://github.com/IdentityServer/IdentityServer4

https://getbootstrap.com/

https://nodejs.org/en/

https://www.npmjs.com/




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap