Browse Source
Merge pull request #1520 from colinin/fix-audience
fix: Fix the error of the authorized object
pull/1492/merge
yx lin
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
1 deletions
-
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs
|
|
|
@ -59,7 +59,14 @@ public partial class MicroServiceApplicationsSingleModule |
|
|
|
{ |
|
|
|
builder.AddValidation(options => |
|
|
|
{ |
|
|
|
options.AddAudiences("all_in_one"); |
|
|
|
var validAudiences = configuration.GetSection("AuthServer:ValidAudiences").Get<List<string>>(); |
|
|
|
if (validAudiences?.Count > 0) |
|
|
|
{ |
|
|
|
foreach (var audience in validAudiences) |
|
|
|
{ |
|
|
|
options.AddAudiences(audience); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
options.UseLocalServer(); |
|
|
|
|
|
|
|
|