mirror of https://github.com/abpframework/abp
parent
c2eb7314f8
commit
47dfa65589
@ -1,4 +1,17 @@
|
||||
@page
|
||||
@using Volo.Abp.Users
|
||||
@model PublicWebSite.Host.Pages.IndexModel
|
||||
@inject ICurrentUser CurrentUser
|
||||
<h1>Public Web Site Application</h1>
|
||||
<h2 class="lead">Welcome...</h2>
|
||||
<h2 class="lead">Welcome...</h2>
|
||||
|
||||
@if (CurrentUser.IsAuthenticated)
|
||||
{
|
||||
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account">Logout</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<form method="POST">
|
||||
<input type="submit" asp-page-handler="Login" value="Login" />
|
||||
</form>
|
||||
}
|
@ -1,16 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
|
||||
|
||||
namespace PublicWebSite.Host.Pages
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
public class IndexModel : AbpPageModel
|
||||
{
|
||||
public void OnGet()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public async Task OnPostLoginAsync()
|
||||
{
|
||||
await HttpContext.ChallengeAsync("oidc");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
|
||||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
|
||||
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
|
After Width: | Height: | Size: 400 KiB |
Loading…
Reference in new issue