mirror of https://github.com/abpframework/abp.git
13 changed files with 56 additions and 54 deletions
@ -0,0 +1,8 @@ |
|||
namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme; |
|||
|
|||
public class AuthenticationOptions |
|||
{ |
|||
public string LoginUrl { get; set; } = "authentication/login"; |
|||
|
|||
public string LogoutUrl { get; set; } = "authentication/logout"; |
|||
} |
|||
@ -1,17 +1,16 @@ |
|||
@inject NavigationManager Navigation |
|||
|
|||
@using Volo.Abp.DependencyInjection |
|||
@using Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic |
|||
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication |
|||
@using Microsoft.Extensions.Options |
|||
@inherits RedirectToLogin |
|||
@attribute [ExposeServices(typeof(RedirectToLogin))] |
|||
@attribute [Dependency(ReplaceServices = true)] |
|||
@inject IOptions<AuthenticationOptions> AuthenticationOptions |
|||
|
|||
@code { |
|||
|
|||
protected override void OnInitialized() |
|||
{ |
|||
Navigation.NavigateToLogin("authentication/login"); |
|||
Navigation.NavigateToLogin(AuthenticationOptions.Value.LoginUrl); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue