Skip to content

Commit d4ba9f3

Browse files
committed
update
1 parent b7d2e9a commit d4ba9f3

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Aspire/Aspire.Hosting.ServiceBus/Aspire.Hosting.ServiceBus.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<IsAspireSharedProject>true</IsAspireSharedProject>
9+
<IsPackable>false</IsPackable>
910
</PropertyGroup>
1011

1112
<ItemGroup>

EfCore/EfCore.Repos.Tests/DistributedApplicationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static async Task WaitForResourcesAsync(this DistributedApplication app,
2929
var logger = app.Services.GetRequiredService<ILoggerFactory>().CreateLogger(nameof(WaitForResourcesAsync));
3030

3131
targetStates ??=
32-
[KnownResourceStates.Running, KnownResourceStates.Hidden, .. KnownResourceStates.TerminalStates];
32+
[KnownResourceStates.Running, .. KnownResourceStates.TerminalStates];
3333
var applicationModel = app.Services.GetRequiredService<DistributedApplicationModel>();
3434
var resourceNotificationService = app.Services.GetRequiredService<ResourceNotificationService>();
3535

z_Templates/SlimBus.ApiEndpoints/SlimBus.Api/Configs/Auth/MsGraphJwtTokenHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ internal class MsGraphJwtTokenHandler : JwtSecurityTokenHandler
1414
/// </summary>
1515
/// <param name="token">The JWT token to validate.</param>
1616
/// <exception cref="SecurityTokenValidationException">Thrown if the token validation against Microsoft Graph fails.</exception>
17-
private async Task ValidateTokenWithMsGraphEndPoint(string token)
17+
private static async Task ValidateTokenWithMsGraphEndPoint(string token)
1818
{
1919
// Create an HTTP client for sending requests.
2020
using var httpClient = new HttpClient();
@@ -65,7 +65,7 @@ public override async Task<TokenValidationResult> ValidateTokenAsync(string toke
6565
// Return the successful result if Microsoft Graph validation passes.
6666
return rs;
6767
}
68-
catch (Exception ex)
68+
catch (SecurityTokenValidationException ex)
6969
{
7070
// Return a failed result if there was an exception during Microsoft Graph validation.
7171
return new TokenValidationResult

z_Templates/SlimBus.ApiEndpoints/SlimBus.Api/Configs/Swagger/SwaggerConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public static WebApplication UseOpenApiDoc(this WebApplication app)
8080
c.WithTitle($"{SharedConsts.ApiName} API")
8181
.WithTheme(ScalarTheme.Default)
8282
//.WithOpenApiRoutePattern("{documentName}.json")
83-
.WithPreferredScheme("Bearer")
84-
.WithHttpBearerAuthentication(b => b.Token = "bearer token")
83+
.AddPreferredSecuritySchemes("Bearer")
84+
.AddHttpAuthentication("Bearer",b => b.Token = "bearer token")
8585
);
8686

8787
Console.WriteLine("Swagger enabled.");

0 commit comments

Comments
 (0)