123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using XF.Domain.Authentications;
- namespace Hotline.Authentications
- {
- public class FakeSessionContext : ISessionContext
- {
- /// <summary>
- /// Id of current tenant or null for host
- /// </summary>
- public string? UserId { get; init; }
- /// <summary>
- /// Id of current user or throw Exception for guest
- /// </summary>
- /// <exception cref="AuthenticationException"></exception>
- public string RequiredUserId => UserId ?? throw new ArgumentNullException();
- public string? UserName { get; init; }
- public string? Phone { get; init; }
- /// <summary>
- /// Roles
- /// </summary>
- public string[] Roles { get; init; }
- public string? OrgId { get; init; }
- public string RequiredOrgId => OrgId ?? throw new ArgumentNullException();
- public string? OrgName { get; init; }
- public int OrgLevel { get; init; }
- public string? OrgAreaCode { get; init; }
- public bool OrgIsCenter { get; init; }
- /// <summary>
- /// 部门行政区划名称
- /// </summary>
- public string? OrgAreaName { get; init; }
- public string? AreaId { get; init; }
- public string? ClientId { get; init; }
- /// <summary>
- /// 工号
- /// </summary>
- public string? StaffNo { get; init; }
- }
- }
|