mirror of https://github.com/abpframework/abp.git
6 changed files with 66 additions and 26 deletions
@ -0,0 +1,15 @@ |
|||
using Volo.Abp.DependencyInjection; |
|||
|
|||
namespace Volo.Abp.AspNetCore.Components.Web.Security; |
|||
|
|||
public delegate void ApplicationConfigurationChangedHandler(); |
|||
|
|||
public class ApplicationConfigurationChangedService : IScopedDependency |
|||
{ |
|||
public event ApplicationConfigurationChangedHandler Changed; |
|||
|
|||
public void NotifyChanged() |
|||
{ |
|||
Changed?.Invoke(); |
|||
} |
|||
} |
|||
@ -1,7 +1,18 @@ |
|||
@page "/authentication/{action}" |
|||
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication |
|||
<RemoteAuthenticatorView Action="@Action" /> |
|||
|
|||
@using Volo.Abp.AspNetCore.Components.Web.Security |
|||
<RemoteAuthenticatorView Action="@Action" OnLogInSucceeded="OnLogInSucceeded" OnLogOutSucceeded="OnLogOutSucceeded" /> |
|||
@inject WebAssemblyCachedApplicationConfigurationClient WebAssemblyCachedApplicationConfigurationClient |
|||
@code{ |
|||
[Parameter] public string Action { get; set; } |
|||
|
|||
private async Task OnLogInSucceeded(RemoteAuthenticationState state) |
|||
{ |
|||
await WebAssemblyCachedApplicationConfigurationClient.InitializeAsync(); |
|||
} |
|||
|
|||
private async Task OnLogOutSucceeded(RemoteAuthenticationState state) |
|||
{ |
|||
await WebAssemblyCachedApplicationConfigurationClient.InitializeAsync(); |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue