feat(#IW622): 支持二级域名单点登录

#Comment
comment #IW622

#Issue
close https://gitee.com/LongbowEnterprise/dashboard/issues?id=IW622
This commit is contained in:
Argo Zhang 2019-05-05 15:35:06 +08:00
parent 9bc8cf6f5c
commit 0764437f3f
6 changed files with 11 additions and 2 deletions

View File

@ -80,7 +80,11 @@ namespace Bootstrap.Admin
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
JsonConvert.DefaultSettings = () => options.SerializerSettings;
}).SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options => options.Cookie.Path = "/");
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
{
options.Cookie.Path = "/";
options.Cookie.Domain = Configuration["Domain"];
});
services.AddApiVersioning(option =>
{
option.DefaultApiVersion = new ApiVersion(1, 0);

View File

@ -17,6 +17,7 @@
},
"SwaggerPathBase": "",
"AllowOrigins": "http://localhost:49185",
"Domain": null,
"KeyPath": "..\\keys",
"DisableAutomaticKeyGeneration": false,
"LongbowCache": {

View File

@ -51,6 +51,7 @@
],
"SwaggerPathBase": "/BA",
"AllowOrigins": "http://localhost,http://argo.zylweb.cn",
"Domain": null,
"KeyPath": "..\\keys",
"ApplicationName": "__bd__",
"ApplicationDiscriminator": "BootstrapAdmin",

View File

@ -60,6 +60,7 @@ namespace Bootstrap.Client
services.AddAuthentication(CookieAuthenticationDefaults.AuthenticationScheme).AddCookie(options =>
{
options.Cookie.Path = "/";
options.Cookie.Domain = Configuration["Domain"];
options.RebuildRedirectUri(Configuration["AuthHost"]);
});
}

View File

@ -32,5 +32,6 @@
],
"KeyPath": "..\\keys",
"AuthHost": "http://localhost:50852",
"AllowOrigins": "http://localhost:50852"
"AllowOrigins": "http://localhost:50852",
"Domain": null
}

View File

@ -30,6 +30,7 @@
],
"AppId": 2,
"AuthHost": "http://argo.zylweb.cn/BA",
"Domain": null,
"AllowOrigins": "http://localhost,http://argo.zylweb.cn",
"KeyPath": "..\\keys",
"ApplicationName": "__bd__",