src/ZKEACMS/Controllers/AccountController.cs
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* http://www.zkea.net/
* Copyright (c) ZKEASOFT. All rights reserved.
* http://www.zkea.net/licenses */
using Easy.Constant;
using Easy.Extend;
using Easy.Modules.User.Models;
using Easy.Modules.User.Service;
using Easy.Mvc.Authorize;
using ZKEACMS.Notification;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNetCore.DataProtection;
using ZKEACMS.Account;
using Microsoft.Extensions.Logging;
using Easy.Mvc.Extend;
using ZKEACMS.Common.ViewModels;
using Easy;
namespace ZKEACMS.Controllers
{
public class AccountController : Controller
{
private readonly IUserService _userService;
private readonly INotifyService _notifyService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IApplicationContextAccessor _applicationContextAccessor;
private readonly ILogger<AccountController> _logger;
private readonly ILocalize _localize;
public AccountController(IUserService userService,
INotifyService notifyService,
IDataProtectionProvider dataProtectionProvider,
ILogger<AccountController> logger,
IApplicationContextAccessor applicationContextAccessor,
ILocalize localize)
{
_userService = userService;
_notifyService = notifyService;
_dataProtectionProvider = dataProtectionProvider;
_applicationContextAccessor = applicationContextAccessor;
_logger = logger;
_localize = localize;
}
#region Admin
public ActionResult Login()
{
return View();
}
[HttpPost, ValidateAntiForgeryToken]
public async Task<ActionResult> Login(AdminSignViewModel model, string ReturnUrl)
{
if (ModelState.IsValid)
{
var user = _userService.Login(model.UserID, model.PassWord, UserType.Administrator, Request.HttpContext.Connection.RemoteIpAddress?.ToString());
if (user != null)
后面还有 227 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。