IdentityServer3 使用记录
官方教程:https://identityserver.github.io/Documentation/docsv2/overview/mvcGettingStarted.html
1、是否启用 SSL 需要在 Startup.cs 中进行标注 RequireSsl = false
public void Configuration(IAppBuilder app) { app.Map("/identity", idsrvApp => { idsrvApp.UseIdentityServer(new IdentityServerOptions { SiteName = "Embedded IdentityServer", SigningCertificate = LoadCertificate(), RequireSsl = false, Factory = new IdentityServerServiceFactory() .UseInMemoryUsers(Users.Get()) .UseInMemoryClients(Clients.Get()) .UseInMemoryScopes(StandardScopes.All) }); }); }
2、浏览 http://xxx:xxx/identity/ 时没有样式,因为一些嵌入式资源没有被加载,需要在 web.config 中配置
<system.webServer> <modules runAllManagedModulesForAllRequests="true" /> </system.webServer>