chore: 初始化项目基础文件
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
namespace TakeoutSaaS.Module.Identity.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// 微信登录服务抽象(code2Session)
|
||||
/// </summary>
|
||||
public interface IWeChatAuthService
|
||||
{
|
||||
/// <summary>
|
||||
/// 使用小程序登录 code 换取 openid/unionid/session_key
|
||||
/// </summary>
|
||||
Task<WeChatSessionInfo> Code2SessionAsync(string code, CancellationToken cancellationToken = default);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 微信会话信息
|
||||
/// </summary>
|
||||
public sealed class WeChatSessionInfo
|
||||
{
|
||||
public string OpenId { get; init; } = string.Empty;
|
||||
public string? UnionId { get; init; }
|
||||
public string SessionKey { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user