Browse Source

Resolved #968: Set IdentityServerAuthentication Authority URL from appsettings.json

pull/997/head
Halil ibrahim Kalkan 8 years ago
parent
commit
c6f44da5d8
  1. 2
      templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppModule.cs
  2. 8
      templates/service/host/MyCompanyName.MyProjectName.Host/appsettings.json

2
templates/service/host/MyCompanyName.MyProjectName.Host/DemoAppModule.cs

@ -81,7 +81,7 @@ namespace MyCompanyName.MyProjectName.Host
context.Services.AddAuthentication("Bearer")
.AddIdentityServerAuthentication(options =>
{
options.Authority = "http://localhost:61517";
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.ApiName = "api1";

8
templates/service/host/MyCompanyName.MyProjectName.Host/appsettings.json

@ -5,7 +5,11 @@
"AbpSettingManagement": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true",
"AbpPermissionManagement": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true",
"AbpAuditLogging": "Server=localhost;Database=MyProjectName_Identity;Trusted_Connection=True;MultipleActiveResultSets=true",
"SqlServerCache": "Server=localhost;Database=MyProjectName_Cache;Trusted_Connection=True;MultipleActiveResultSets=true"
}
},
"AuthServer": {
"Authority": "http://localhost:61517"
}
}
Loading…
Cancel
Save