chore 优化authserverAudience
This commit is contained in:
@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Cors;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using OpenIddict.Validation;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
@ -26,6 +27,7 @@ using Volo.Abp.Localization;
|
||||
using Volo.Abp.Modularity;
|
||||
using Volo.Abp.OpenIddict;
|
||||
using Volo.Abp.Security.Claims;
|
||||
using Volo.Abp.UI.Navigation.Urls;
|
||||
using IPNetwork = Microsoft.AspNetCore.HttpOverrides.IPNetwork;
|
||||
|
||||
namespace KonSoft;
|
||||
@ -50,7 +52,7 @@ public class KonSoftAuthServerModule : AbpModule
|
||||
{
|
||||
builder.AddValidation(options =>
|
||||
{
|
||||
options.AddAudiences("KonSoft");
|
||||
options.AddAudiences(KonSoftConsts.AuthServerAudience);
|
||||
options.UseLocalServer();
|
||||
options.UseAspNetCore();
|
||||
});
|
||||
@ -63,6 +65,11 @@ public class KonSoftAuthServerModule : AbpModule
|
||||
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
||||
});
|
||||
|
||||
Configure<OpenIddictServerBuilder>(options =>
|
||||
{
|
||||
options.SetIssuer("");
|
||||
});
|
||||
|
||||
if (!hostingEnvironment.IsDevelopment())
|
||||
{
|
||||
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options =>
|
||||
|
||||
Reference in New Issue
Block a user