Skip to content

Commit

Permalink
Update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
fretje committed Mar 9, 2023
1 parent 65487cf commit 3690e9b
Show file tree
Hide file tree
Showing 41 changed files with 1,527 additions and 1,434 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.4.33">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<!-- See https://github.com/dotnet/roslyn-analyzers/issues/6141 and https://github.com/dotnet/roslyn-analyzers/issues/6285 -->
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview1.23080.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions src/Admin/Admin.Application/Admin.Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<PackageReference Include="Fluxor.Blazor.Web" Version="5.7.0" />
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
<PackageReference Include="Mapster" Version="7.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.3" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Localization" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0" />
</ItemGroup>
Expand All @@ -36,5 +36,5 @@
<ItemGroup>
<Folder Include="wwwroot\img\" />
</ItemGroup>

</Project>
232 changes: 107 additions & 125 deletions src/Admin/Admin.Application/packages.lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Admin/Admin.Host/Admin.Host.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="7.0.3" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
</ItemGroup>

Expand Down
232 changes: 107 additions & 125 deletions src/Admin/Admin.Host/packages.lock.json

Large diffs are not rendered by default.

13 changes: 6 additions & 7 deletions src/Admin/Admin.Infrastructure/Admin.Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
<PackageReference Include="Fluxor.Persist" Version="2.4.0" />
<PackageReference Include="MediatR.Courier.DependencyInjection" Version="5.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.2" />
<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="7.0.2" />
<PackageReference Include="MediatR.Courier" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.3" />
<PackageReference Include="Microsoft.Authentication.WebAssembly.Msal" Version="7.0.3" />
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.2" />
<PackageReference Include="MudBlazor" Version="6.1.8" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="7.0.3" />
<PackageReference Include="MudBlazor" Version="6.1.9" />
<PackageReference Include="NSwag.MSBuild" Version="13.18.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Heroplate.Admin.Infrastructure.Auth.Jwt;

internal class AccessTokenProviderAccessor : IAccessTokenProviderAccessor
internal sealed class AccessTokenProviderAccessor : IAccessTokenProviderAccessor
{
private readonly IServiceProvider _provider;
private IAccessTokenProvider? _tokenProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Heroplate.Admin.Infrastructure.Auth.Jwt;

public class JwtAuthenticationService : AuthenticationStateProvider, IAuthenticationService, IAccessTokenProvider
public sealed class JwtAuthenticationService : AuthenticationStateProvider, IAuthenticationService, IAccessTokenProvider, IDisposable
{
private const string AuthTokenKey = "AuthToken";
private const string RefreshTokenKey = "RefreshToken";
Expand Down Expand Up @@ -198,7 +198,7 @@ private static IEnumerable<Claim> GetClaimsFromJwt(string jwt)
string? rolesString = roles.ToString();
if (!string.IsNullOrEmpty(rolesString))
{
if (rolesString.Trim().StartsWith("["))
if (rolesString.Trim().StartsWith("[", StringComparison.Ordinal))
{
string[]? parsedRoles = JsonSerializer.Deserialize<string[]>(rolesString);

Expand Down Expand Up @@ -228,4 +228,6 @@ private static byte[] ParseBase64WithoutPadding(string payload)
string base64 = payload.PadRight(payload.Length + ((4 - (payload.Length % 4)) % 4), '=');
return Convert.FromBase64String(base64);
}

public void Dispose() => _semaphore?.Dispose();
}
3 changes: 1 addition & 2 deletions src/Admin/Admin.Infrastructure/Notifications/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Heroplate.Api.Contracts.Notifications;
using MediatR;
using MediatR.Courier;
using MediatR.Courier.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;

namespace Heroplate.Admin.Infrastructure.Notifications;
Expand All @@ -13,7 +12,7 @@ public static IServiceCollection AddNotifications(this IServiceCollection servic
// Add mediator processing of notifications
var assemblies = AppDomain.CurrentDomain.GetAssemblies();
services
.AddMediatR(assemblies)
.AddMediatR(options => options.RegisterServicesFromAssemblies(assemblies))
.AddCourier(assemblies)
.AddTransient<INotificationPublisher, NotificationPublisher>();

Expand Down
Loading

0 comments on commit 3690e9b

Please sign in to comment.