@@ -31,7 +31,7 @@ public class DefaultHttpContextAccessor : ISessionContext, IScopeDependency
public HttpContext? HttpContext { get => GetContext(); set => _content = value; }
- public string? OpenId { get { return TestSessionConstants.OpenId; } set { } }
+ public string? OpenId { get; init; }
/// <summary>
/// Id of current tenant or null for host
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>net7.0</TargetFramework>
+ <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
@@ -44,5 +44,11 @@ namespace Hotline.Authentications
/// 工号
/// </summary>
public string? StaffNo { get; init; }
+
+ /// <summary>
+ /// 第三方平台用户唯一标识
+ /// 例如: 微信的OpenId
+ /// </summary>
}
@@ -56,5 +56,11 @@ namespace Hotline.Authentications
@@ -61,5 +61,11 @@ namespace Hotline.Authentications
@@ -57,5 +57,11 @@ namespace Hotline.Authentications
@@ -78,7 +78,11 @@ namespace XF.Domain.Authentications
- public string? OpenId { get; }
public static class ClaimsPrincipalExtensions
@@ -47,7 +47,8 @@ public interface ISessionContext
string? StaffNo { get; init; }
- /// 微信OpenId
- string? OpenId { get; }
+ string? OpenId { get; init; }