Browse Source
Merge pull request #6209 from abpframework/maliming/patch1
Remove `Updates AbpClaimTypes` code.
pull/6228/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
0 additions and
14 deletions
-
modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs
-
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs
|
|
|
@ -104,12 +104,6 @@ namespace Volo.CmsKit |
|
|
|
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); |
|
|
|
}); |
|
|
|
|
|
|
|
//Updates AbpClaimTypes to be compatible with identity server claims.
|
|
|
|
AbpClaimTypes.UserId = JwtClaimTypes.Subject; |
|
|
|
AbpClaimTypes.UserName = JwtClaimTypes.Name; |
|
|
|
AbpClaimTypes.Role = JwtClaimTypes.Role; |
|
|
|
AbpClaimTypes.Email = JwtClaimTypes.Email; |
|
|
|
|
|
|
|
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) |
|
|
|
.AddJwtBearer(options => |
|
|
|
{ |
|
|
|
@ -172,7 +166,6 @@ namespace Volo.CmsKit |
|
|
|
app.UseRouting(); |
|
|
|
app.UseCors(DefaultCorsPolicyName); |
|
|
|
app.UseAuthentication(); |
|
|
|
app.UseAbpClaimsMap(); |
|
|
|
if (MultiTenancyConsts.IsEnabled) |
|
|
|
{ |
|
|
|
app.UseMultiTenancy(); |
|
|
|
|
|
|
|
@ -105,12 +105,6 @@ namespace MyCompanyName.MyProjectName |
|
|
|
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); |
|
|
|
}); |
|
|
|
|
|
|
|
//Updates AbpClaimTypes to be compatible with identity server claims.
|
|
|
|
AbpClaimTypes.UserId = JwtClaimTypes.Subject; |
|
|
|
AbpClaimTypes.UserName = JwtClaimTypes.Name; |
|
|
|
AbpClaimTypes.Role = JwtClaimTypes.Role; |
|
|
|
AbpClaimTypes.Email = JwtClaimTypes.Email; |
|
|
|
|
|
|
|
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) |
|
|
|
.AddJwtBearer(options => |
|
|
|
{ |
|
|
|
@ -173,7 +167,6 @@ namespace MyCompanyName.MyProjectName |
|
|
|
app.UseRouting(); |
|
|
|
app.UseCors(DefaultCorsPolicyName); |
|
|
|
app.UseAuthentication(); |
|
|
|
app.UseAbpClaimsMap(); |
|
|
|
if (MultiTenancyConsts.IsEnabled) |
|
|
|
{ |
|
|
|
app.UseMultiTenancy(); |
|
|
|
|