# Quickstart UI for an in-memory IdentityServer4 v2
This repo contains an MVC based UI for login, logout and consent that supplements an IdentityServer4 configured for in-memory clients, users, and scopes.
Note that the repo doesn't include solution and project files, but should be copied to your project as described below.
**note** This branch contains the files for IdentityServer4 v2 and ASP.NET Core / MVC 2. The files for IdentityServer 1.x and ASP.NET Core 1.x can be found [on this branch](https://github.com/IdentityServer/IdentityServer4.Quickstart.UI/tree/aspnetcore1). The documentation for 1.x can be found [here](http://docs.identityserver.io/en/aspnetcore1/).
## Issues
For issues, use the [consolidated IdentityServer4 issue tracker](https://github.com/IdentityServer/IdentityServer4/issues).
## Instructions
The assumption is that you started with an empty web application, added identityserver and configured the resources, clients and users.
### Adding MVC
```csharp
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
// rest omitted
}
public void Configure(IApplicationBuilder app)
{
app.UseStaticFiles();
app.UseIdentityServer();
app.UseMvcWithDefaultRoute();
}
}
```
### Adding the quickstart UI
This repo contains the controllers, models, views and CSS files needed for the UI. Simply download/clone it and copy the folders into the web project.
Alternatively you can run this powershell script from your web project directory to download them automatically:
```
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/IdentityServer/IdentityServer4.Quickstart.UI/master/getmaster.ps1'))
```
Or using bash one-liner on macOS or Linux:
```bash
curl -L https://raw.githubusercontent.com/IdentityServer/IdentityServer4.Quickstart.UI/master/getmaster.sh | bash
```
### Adding support for external authentication
You can add support for external authentication providers by adding additional authentication handlers.
For this example we are adding support for a cloud hosted identityserver instance via the OpenID Connect protocol and Google authentication.
```csharp
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
// some details omitted
services.AddIdentityServer();
services.AddAuthentication()
.AddGoogle("Google", options =>
{
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
options.ClientId = "<insert here>";
options.ClientSecret = "<inser here>";
})
.AddOpenIdConnect("demoidsrv", "IdentityServer", options =>
{
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
options.SignOutScheme = IdentityServerConstants.SignoutScheme;
options.Authority = "https://demo.identityserver.io/";
options.ClientId = "implicit";
options.ResponseType = "id_token";
options.SaveTokens = true;
options.CallbackPath = new PathString("/signin-idsrv");
options.SignedOutCallbackPath = new PathString("/signout-callback-idsrv");
options.RemoteSignOutPath = new PathString("/signout-idsrv");
options.TokenValidationParameters = new TokenValidationParameters
{
NameClaimType = "name",
RoleClaimType = "role"
};
});
}
}
```
**Note** for Google authentication you need to register your local quickstart identityserver using the Google developer [console](https://console.developers.google.com). As a redirect URL, use the URL of your local identityserver and add `/signin-google`.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
C# + SQL Server 本系统包括两类用户:学生、管理员。管理员可以通过系统来添加管理员信息、修改管理员信息、添加学生信息、修改学生信息;开设课程、查询课程、录入成绩、统计成绩 管理系统是一种通过计算机技术实现的用于组织、监控和控制各种活动的软件系统。这些系统通常被设计用来提高效率、减少错误、加强安全性,同时提供数据和信息支持。以下是一些常见类型的管理系统: 学校管理系统: 用于学校或教育机构的学生信息、教职员工信息、课程管理、成绩记录、考勤管理等。学校管理系统帮助提高学校的组织效率和信息管理水平。 人力资源管理系统(HRM): 用于处理组织内的人事信息,包括员工招聘、培训记录、薪资管理、绩效评估等。HRM系统有助于企业更有效地管理人力资源,提高员工的工作效率和满意度。 库存管理系统: 用于追踪和管理商品或原材料的库存。这种系统可以帮助企业避免库存过剩或不足的问题,提高供应链的效率。 客户关系管理系统(CRM): 用于管理与客户之间的关系,包括客户信息、沟通记录、销售机会跟踪等。CRM系统有助于企业更好地理解客户需求,提高客户满意度和保留率。 医院管理系统: 用于管理医院或医疗机构的患者信息、医生排班、药品库存等。这种系统可以提高医疗服务的质量和效率。 财务管理系统: 用于记录和管理组织的财务信息,包括会计凭证、财务报表、预算管理等。财务管理系统
资源推荐
资源详情
资源评论
收起资源包目录
基于.NET5+IdentityServer4+Vue+Sqlserver 的统一授权认证系统,包含系统管理界面。.zip (313个子文件)
20190510005547_ConfigurationInit.cs 28KB
20190510005547_ConfigurationInit.Designer.cs 25KB
ConfigurationDbContextModelSnapshot.cs 25KB
AccountController.cs 13KB
ExternalController.cs 11KB
ConsentController.cs 10KB
20190509095939_password.cs 10KB
ApiResourceController.cs 9KB
DeviceController.cs 9KB
20190513092515_claims.Designer.cs 9KB
ApplicationDbContextModelSnapshot.cs 9KB
ClientDto.cs 9KB
20190510092112_rolecreateon.Designer.cs 8KB
20190510003559_addtest.Designer.cs 8KB
20190510003657_removetest.Designer.cs 8KB
20190509095939_password.Designer.cs 8KB
UpdateClientDto.cs 8KB
UserAppController.cs 8KB
ApiResourceService.cs 8KB
ClientAppService.cs 7KB
CustomResourceOwnerPasswordValidtor.cs 5KB
ClientController.cs 5KB
IdentityResourceController.cs 5KB
Config.cs 5KB
CustomProfileService.cs 5KB
IdentityResourceService.cs 5KB
UserAppService.cs 5KB
RoleAppController.cs 4KB
EnsureSeedData.cs 4KB
IdentityServerConfig.cs 4KB
GrantsController.cs 3KB
Startup.cs 3KB
RoleAppService.cs 3KB
Startup.cs 3KB
20190510005655_PersistedGrantInit.Designer.cs 3KB
PersistedGrantDbContextModelSnapshot.cs 3KB
ClaimsController.cs 3KB
SecurityHeadersAttribute.cs 3KB
20190510005655_PersistedGrantInit.cs 3KB
InfrastructureController.cs 3KB
IdentityConfig.cs 2KB
ApplicationBaseService.cs 2KB
TestUsers.cs 2KB
ClientMapping.cs 2KB
IUserAppService.cs 2KB
AuthenticationConfig.cs 2KB
TestValueController.cs 2KB
HomeController.cs 2KB
SwaggerConfig.cs 2KB
IClientAppService.cs 2KB
AutofacModule.cs 2KB
QueryableExtensions.cs 2KB
ConfigurationRepository.cs 2KB
ApiResourceMapping.cs 2KB
ApplicationRepository.cs 2KB
Program.cs 2KB
IUserManagerService.cs 1KB
AuthorizeClaims.cs 1KB
PermissionAuthorize.cs 1KB
IApiResourceservice.cs 1KB
CustomExceptionMidlleware.cs 1KB
CreateUserDto.cs 1KB
BaseApiController.cs 1KB
20190513092515_claims.cs 1KB
DataBaseConfig.cs 1KB
IIdentityResourceService.cs 1KB
20190510092112_rolecreateon.cs 1KB
AccountOptions.cs 1KB
DiagnosticsViewModel.cs 1KB
LoginViewModel.cs 975B
DiagnosticsController.cs 957B
GrantsViewModel.cs 839B
IdentityResourceDto.cs 827B
IRoleAppService.cs 825B
IdentityResourceMapping.cs 808B
ClientListDto.cs 790B
ApplicationUser.cs 784B
Extensions.cs 778B
PageInputDto.cs 770B
ConfigurePolicy.cs 745B
HomeController.cs 727B
ConsentOptions.cs 724B
UserDetailDto.cs 706B
IApplicationBaseService.cs 700B
LoggedOutViewModel.cs 696B
ConsentViewModel.cs 669B
Pagelist.cs 666B
ProcessConsentResult.cs 648B
CreateIdentityResourceDto.cs 647B
ClientSecretDto.cs 634B
ApiResourceDto.cs 633B
Program.cs 615B
CreateApiScopeDto.cs 604B
20190510003657_removetest.cs 602B
IApplicationRepository.cs 602B
20190510003559_addtest.cs 599B
CreateApiSecretDto.cs 589B
ApiScopeDto.cs 586B
ApplicationDbContext.cs 575B
ApplicationRole.cs 574B
共 313 条
- 1
- 2
- 3
- 4
资源评论
普通的一个普通猿
- 粉丝: 1468
- 资源: 1897
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功