|
|
|
@ -1,6 +1,7 @@ |
|
|
|
using Microsoft.AspNetCore.Authentication.JwtBearer; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using System; |
|
|
|
using Microsoft.IdentityModel.Tokens; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
|
|
|
|
namespace EShopOnAbp.Shared.Hosting.Microservices; |
|
|
|
@ -19,6 +20,10 @@ public static class JwtBearerConfigurationHelper |
|
|
|
options.Authority = configuration["AuthServer:Authority"]; |
|
|
|
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]); |
|
|
|
options.Audience = audience; |
|
|
|
options.TokenValidationParameters = new TokenValidationParameters() |
|
|
|
{ |
|
|
|
ValidateAudience = false //Disabled since seeding audience is not possible with the current keycloak.net library version
|
|
|
|
}; |
|
|
|
}); |
|
|
|
} |
|
|
|
} |