|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using System; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using IdentityModel; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.AspNetCore.Cors; |
|
|
|
using Microsoft.AspNetCore.DataProtection; |
|
|
|
@ -23,6 +24,7 @@ using Volo.Abp.Localization; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.MultiTenancy; |
|
|
|
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|
|
|
using Volo.Abp.Security.Claims; |
|
|
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
|
|
using Volo.Abp.VirtualFileSystem; |
|
|
|
|
|
|
|
@ -86,6 +88,12 @@ namespace MyCompanyName.MyProjectName |
|
|
|
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); |
|
|
|
}); |
|
|
|
|
|
|
|
//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("Bearer") |
|
|
|
.AddIdentityServerAuthentication(options => |
|
|
|
{ |
|
|
|
|