|
|
|
@ -1,4 +1,4 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Linq; |
|
|
|
using System.Security.Claims; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
@ -101,12 +101,14 @@ namespace IdentityService.Host |
|
|
|
app.UseCorrelationId(); |
|
|
|
app.UseVirtualFiles(); |
|
|
|
app.UseRouting(); |
|
|
|
app.UseAbpRequestLocalization(); //TODO: localization?
|
|
|
|
app.UseAuthentication(); |
|
|
|
app.UseAbpRequestLocalization(); //TODO: localization?
|
|
|
|
|
|
|
|
if (MsDemoConsts.IsMultiTenancyEnabled) |
|
|
|
{ |
|
|
|
app.UseMultiTenancy(); |
|
|
|
} |
|
|
|
|
|
|
|
app.Use(async (ctx, next) => |
|
|
|
{ |
|
|
|
var currentPrincipalAccessor = ctx.RequestServices.GetRequiredService<ICurrentPrincipalAccessor>(); |
|
|
|
@ -121,7 +123,6 @@ namespace IdentityService.Host |
|
|
|
currentPrincipalAccessor.Principal.AddIdentity(new ClaimsIdentity(mapClaims.Select(p => new Claim(map[p.Type], p.Value, p.ValueType, p.Issuer)))); |
|
|
|
await next(); |
|
|
|
}); |
|
|
|
|
|
|
|
app.UseSwagger(); |
|
|
|
app.UseSwaggerUI(options => |
|
|
|
{ |
|
|
|
|