|
|
|
@ -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(); |
|
|
|
|