39 lines
820 B
C#
39 lines
820 B
C#
using JNPF.Extras.CollectiveOAuth.Enums;
|
|
|
|
namespace JNPF.Extras.CollectiveOAuth.Config;
|
|
|
|
/// <summary>
|
|
/// 微信公众平台.
|
|
/// </summary>
|
|
public class WechatMPAuthSource : IAuthSource
|
|
{
|
|
public string accessToken()
|
|
{
|
|
return "https://api.weixin.qq.com/sns/oauth2/access_token";
|
|
}
|
|
|
|
public string authorize()
|
|
{
|
|
return "https://open.weixin.qq.com/connect/oauth2/authorize";
|
|
}
|
|
|
|
public string getName()
|
|
{
|
|
return DefaultAuthSourceEnum.WECHAT_MP.ToString();
|
|
}
|
|
|
|
public string refresh()
|
|
{
|
|
return "https://api.weixin.qq.com/sns/oauth2/refresh_token";
|
|
}
|
|
|
|
public string revoke()
|
|
{
|
|
throw new System.NotImplementedException();
|
|
}
|
|
|
|
public string userInfo()
|
|
{
|
|
return "https://api.weixin.qq.com/sns/userinfo";
|
|
}
|
|
} |