Browse Source
Make sure the `ImplementationType` is `RemoteAuthenticationService`
pull/19479/head
maliming
3 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
5 additions and
1 deletions
-
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpAspNetCoreComponentsWebAssemblyModule.cs
|
|
|
@ -3,6 +3,7 @@ using System.Globalization; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Microsoft.AspNetCore.Components.Authorization; |
|
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Authentication; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Logging; |
|
|
|
using Volo.Abp.AspNetCore.Components.Web; |
|
|
|
@ -52,7 +53,10 @@ public class AbpAspNetCoreComponentsWebAssemblyModule : AbpModule |
|
|
|
public override void PostConfigureServices(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var msAuthenticationStateProvider = context.Services.FirstOrDefault(x => x.ServiceType == typeof(AuthenticationStateProvider)); |
|
|
|
if (msAuthenticationStateProvider != null && msAuthenticationStateProvider.ImplementationType != null) |
|
|
|
if (msAuthenticationStateProvider != null && |
|
|
|
msAuthenticationStateProvider.ImplementationType != null && |
|
|
|
msAuthenticationStateProvider.ImplementationType.IsGenericType && |
|
|
|
msAuthenticationStateProvider.ImplementationType.GetGenericTypeDefinition() == typeof(RemoteAuthenticationService<,,>)) |
|
|
|
{ |
|
|
|
var webAssemblyAuthenticationStateProviderType = typeof(WebAssemblyAuthenticationStateProvider<,,>).MakeGenericType( |
|
|
|
msAuthenticationStateProvider.ImplementationType.GenericTypeArguments[0], |
|
|
|
|