init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace HTB.DevFx.Security
{
/// <summary>
/// 当前系统用户认证器,存储当前用户认证信息
/// </summary>
public class Authenticator
{
/// <summary>
/// 当前登录的用户编号,未登录则为0
/// </summary>
public static int UserID
{
get { return HttpContext.Current.User.Identity.IsAuthenticated ? Convert.ToInt32(HttpContext.Current.User.Identity.Name) : 0; }
}
/// <summary>
/// 标示当前用户是否已经通过认证
/// </summary>
public static bool IsAuthenticated
{
get { return HttpContext.Current.User.Identity.IsAuthenticated; }
}
}
}