diff --git a/module.ignore b/module.ignore index d641cb5cf3..d1981acc1e 100644 --- a/module.ignore +++ b/module.ignore @@ -5,13 +5,11 @@ Azure.Messaging.EventGrid.dll Azure.Security.KeyVault.Secrets.dll Dapper.dll DnsClient.dll -dotnet-swagger.dll EntityFrameworkCore.Triggers.dll FluentValidation.dll Hangfire.AspNetCore.dll Hangfire.Console.dll Hangfire.Core.dll -Hangfire.Core.resources.dll Hangfire.MemoryStorage.dll Hangfire.MySql.dll Hangfire.NetCore.dll @@ -36,9 +34,6 @@ Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll Microsoft.AspNetCore.JsonPatch.dll Microsoft.AspNetCore.Metadata.dll Microsoft.AspNetCore.Mvc.NewtonsoftJson.dll -Microsoft.AspNetCore.Server.Kestrel.Https.dll -Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll -Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.dll Microsoft.AspNetCore.SignalR.Client.Core.dll Microsoft.AspNetCore.SignalR.Client.dll Microsoft.AspNetCore.SignalR.Common.dll @@ -50,6 +45,7 @@ Microsoft.Azure.SignalR.Common.dll Microsoft.Azure.SignalR.dll Microsoft.Azure.SignalR.Protocols.dll Microsoft.Bcl.AsyncInterfaces.dll +Microsoft.Bcl.TimeProvider.dll Microsoft.CodeAnalysis.CSharp.dll Microsoft.CodeAnalysis.CSharp.resources.dll Microsoft.CodeAnalysis.CSharp.Workspaces.dll @@ -66,20 +62,28 @@ Microsoft.EntityFrameworkCore.Design.dll Microsoft.EntityFrameworkCore.dll Microsoft.EntityFrameworkCore.Relational.dll Microsoft.EntityFrameworkCore.SqlServer.dll -Microsoft.Extensions.Caching.Memory.dll +Microsoft.Extensions.AmbientMetadata.Application.dll +Microsoft.Extensions.Compliance.Abstractions.dll Microsoft.Extensions.Configuration.AzureAppConfiguration.dll +Microsoft.Extensions.Configuration.Binder.dll Microsoft.Extensions.DependencyInjection.Abstractions.dll -Microsoft.Extensions.DependencyInjection.dll +Microsoft.Extensions.DependencyInjection.AutoActivation.dll Microsoft.Extensions.DependencyModel.dll Microsoft.Extensions.DiagnosticAdapter.dll +Microsoft.Extensions.Diagnostics.ExceptionSummarization.dll Microsoft.Extensions.Features.dll +Microsoft.Extensions.Http.Diagnostics.dll Microsoft.Extensions.Http.Polly.dll +Microsoft.Extensions.Http.Resilience.dll Microsoft.Extensions.Identity.Core.dll Microsoft.Extensions.Identity.Stores.dll Microsoft.Extensions.Logging.Abstractions.dll Microsoft.Extensions.Logging.AzureAppServices.dll +Microsoft.Extensions.ObjectPool.dll Microsoft.Extensions.Options.dll -Microsoft.Extensions.PlatformAbstractions.dll +Microsoft.Extensions.Resilience.dll +Microsoft.Extensions.Telemetry.Abstractions.dll +Microsoft.Extensions.Telemetry.dll Microsoft.Identity.Client.dll Microsoft.Identity.Client.Extensions.Msal.dll Microsoft.IdentityModel.Abstractions.dll @@ -88,10 +92,12 @@ Microsoft.IdentityModel.Logging.dll Microsoft.IdentityModel.Protocols.dll Microsoft.IdentityModel.Protocols.OpenIdConnect.dll Microsoft.IdentityModel.Tokens.dll +Microsoft.IdentityModel.Validators.dll +Microsoft.IO.RecyclableMemoryStream.dll +Microsoft.Net.Http.Headers.dll Microsoft.NET.StringTools.dll Microsoft.OpenApi.dll Microsoft.SqlServer.Server.dll -Microsoft.VisualStudio.Web.BrowserLink.dll Microsoft.Win32.SystemEvents.dll Mono.TextTemplating.dll MySqlConnector.dll @@ -124,7 +130,9 @@ package-lock.json Pipelines.Sockets.Unofficial.dll Polly.Core.dll Polly.dll +Polly.Extensions.dll Polly.Extensions.Http.dll +Polly.RateLimiting.dll Pomelo.EntityFrameworkCore.MySql.dll RedLockNet.Abstractions.dll RedLockNet.SERedis.dll @@ -139,7 +147,6 @@ Serilog.Settings.Configuration.dll Serilog.Sinks.Console.dll Serilog.Sinks.Debug.dll Serilog.Sinks.File.dll -sni.dll StackExchange.Redis.dll Swashbuckle.AspNetCore.Annotations.dll Swashbuckle.AspNetCore.Filters.Abstractions.dll @@ -156,13 +163,11 @@ System.Composition.Hosting.dll System.Composition.Runtime.dll System.Composition.TypedParts.dll System.Configuration.ConfigurationManager.dll -System.Data.SqlClient.dll System.Drawing.Common.dll System.IdentityModel.Tokens.Jwt.dll System.IO.Abstractions.dll System.Linq.Async.dll System.Memory.Data.dll -System.Net.WebSockets.WebSocketProtocol.dll System.Runtime.Caching.dll System.Security.Cryptography.ProtectedData.dll System.Security.Cryptography.Xml.dll diff --git a/src/VirtoCommerce.Platform.Security/Extensions/ClaimsPrincipalExtensions.cs b/src/VirtoCommerce.Platform.Security/Extensions/ClaimsPrincipalExtensions.cs index dbcd511187..579c6489d4 100644 --- a/src/VirtoCommerce.Platform.Security/Extensions/ClaimsPrincipalExtensions.cs +++ b/src/VirtoCommerce.Platform.Security/Extensions/ClaimsPrincipalExtensions.cs @@ -14,7 +14,7 @@ public static bool IsExternalSignIn(this ClaimsPrincipal claimsPrincipal) public static string GetAuthenticationMethod(this ClaimsPrincipal claimsPrincipal) { - return claimsPrincipal?.GetClaim(ClaimTypes.AuthenticationMethod); + return claimsPrincipal?.FindFirstValue(ClaimTypes.AuthenticationMethod); } public static ClaimsPrincipal SetAuthenticationMethod(this ClaimsPrincipal claimsPrincipal, string value, IList destinations) diff --git a/src/VirtoCommerce.Platform.Security/VirtoCommerce.Platform.Security.csproj b/src/VirtoCommerce.Platform.Security/VirtoCommerce.Platform.Security.csproj index 1348953fe9..4a713e9cd7 100644 --- a/src/VirtoCommerce.Platform.Security/VirtoCommerce.Platform.Security.csproj +++ b/src/VirtoCommerce.Platform.Security/VirtoCommerce.Platform.Security.csproj @@ -22,6 +22,7 @@ + diff --git a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/security/services/auth.js b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/security/services/auth.js index efc5dc3654..57e75c9425 100644 --- a/src/VirtoCommerce.Platform.Web/wwwroot/js/app/security/services/auth.js +++ b/src/VirtoCommerce.Platform.Web/wwwroot/js/app/security/services/auth.js @@ -103,12 +103,10 @@ angular.module('platformWebApp') }; authContext.logout = function () { - var extenralSignInData = externalSignInStorage.get(); - if (extenralSignInData && extenralSignInData.providerType) { + var externalSignInData = externalSignInStorage.get(); + if (externalSignInData && externalSignInData.providerType) { externalSignInStorage.remove(); - changeAuth({}); - var url = 'externalsignin/signout?authenticationType=' + extenralSignInData.providerType; - $window.location.href = url; + $window.location.href = 'externalsignin/signout?authenticationType=' + externalSignInData.providerType; } else { authDataStorage.clearStoredData();