Files
tiku-backend.net/Tiku.Application/Auth/IWechatOAuthClient.cs
xiong c497a3ca8d
Some checks failed
ci / release-gate (push) Has been cancelled
清理代码
2026-08-03 12:31:39 +08:00

26 lines
658 B
C#

namespace Tiku.Application.Auth;
public sealed record WechatProviderOptions(
string AppId,
string AppSecret);
public sealed record WechatIdentity(
string OpenId,
string? UnionId,
string? Nickname,
string? AvatarUrl,
string? SessionKey,
string RawJson);
public interface IWechatOAuthClient
{
Task<WechatIdentity> ExchangeWebCodeAsync(
WechatProviderOptions options,
string code,
CancellationToken cancellationToken = default);
Task<WechatIdentity> ExchangeMiniAppCodeAsync(
WechatProviderOptions options,
string code,
CancellationToken cancellationToken = default);
}