添加项目文件。
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝服务窗.
|
||||
/// </summary>
|
||||
public class AlipayMPAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://openauth.alipay.com/oauth2/publicAppAuthorize.htm";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://openapi.alipay.com/gateway.do";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://openapi.alipay.com/gateway.do";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.ALIPAY_MP.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 百度开放平台.
|
||||
/// </summary>
|
||||
public class BaiduAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://openapi.baidu.com/oauth/2.0/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://openapi.baidu.com/oauth/2.0/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://openapi.baidu.com/rest/2.0/passport/users/getInfo";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
return "https://openapi.baidu.com/rest/2.0/passport/auth/revokeAuthorization";
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://openapi.baidu.com/oauth/2.0/token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.BAIDU.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Coding扣钉.
|
||||
/// </summary>
|
||||
public class CodingAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://coding.net/oauth_authorize.html";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://coding.net/api/oauth/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://coding.net/api/account/current_user";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.CODING.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 钉钉扫码.
|
||||
/// </summary>
|
||||
public class DingTalkScanAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://login.dingtalk.com/oauth2/auth";
|
||||
//return "https://oapi.dingtalk.com/connect/qrconnect";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://api.dingtalk.com/v1.0/oauth2/userAccessToken";
|
||||
//throw new System.NotImplementedException(AuthResponseStatus.UNSUPPORTED.GetDesc());
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.dingtalk.com/v1.0/contact/users/me";
|
||||
//return "https://oapi.dingtalk.com/sns/getuserinfo_bycode"; ;
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.DINGTALK.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 抖音.
|
||||
/// </summary>
|
||||
public class DouyinAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://open.douyin.com/platform/oauth/connect";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://open.douyin.com/oauth/access_token/";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://open.douyin.com/oauth/userinfo/";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://open.douyin.com/oauth/refresh_token/";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.DOUYIN.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 饿了么.
|
||||
/// </summary>
|
||||
public class ElemeAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://open-api.shop.ele.me/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://open-api.shop.ele.me/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://open-api.shop.ele.me/api/v1/";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://open-api.shop.ele.me/token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.ELEME.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Facebook.
|
||||
/// </summary>
|
||||
public class FackbookAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://www.facebook.com/v3.3/dialog/oauth";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://graph.facebook.com/v3.3/oauth/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://graph.facebook.com/v3.3/me";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.FACEBOOK.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 飞书.
|
||||
/// </summary>
|
||||
public class FeiShuAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://open.feishu.cn/open-apis/authen/v1/index";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://open.feishu.cn/open-apis/authen/v1/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://open.feishu.cn/open-apis/authen/v1/user_info";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
return "https://open.feishu.cn/open-apis/authen/v1/refresh_access_token";
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://open.feishu.cn/open-apis/authen/v1/refresh_access_token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.FEISHU.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Gitee.
|
||||
/// </summary>
|
||||
public class GiteeAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://gitee.com/oauth/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://gitee.com/oauth/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://gitee.com/api/v5/user";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.GITEE.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Github.
|
||||
/// </summary>
|
||||
public class GithubAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://github.com/login/oauth/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://github.com/login/oauth/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.github.com/user";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.GITHUB.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Gitlab.
|
||||
/// </summary>
|
||||
public class GitlabAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://gitlab.com/oauth/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://gitlab.com/oauth/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://gitlab.com/api/v4/user";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.GITLAB.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Google(谷歌).
|
||||
/// </summary>
|
||||
public class GoogleAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://accounts.google.com/o/oauth2/v2/auth";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://www.googleapis.com/oauth2/v4/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://www.googleapis.com/oauth2/v3/userinfo";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.GOOGLE.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 华为.
|
||||
/// </summary>
|
||||
public class HuaweiAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://oauth-login.cloud.huawei.com/oauth2/v2/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://oauth-login.cloud.huawei.com/oauth2/v2/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.vmall.com/rest.php";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://oauth.kujiale.com/oauth2/auth/token/refresh";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.KUJIALE.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 酷家乐.
|
||||
/// </summary>
|
||||
public class KujialeAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://oauth.kujiale.com/oauth2/show";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://oauth.kujiale.com/oauth2/auth/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://oauth.kujiale.com/oauth2/openapi/user";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://oauth-login.cloud.huawei.com/oauth2/v2/token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.KUJIALE.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Linkin领英.
|
||||
/// </summary>
|
||||
public class LinkedInAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://www.linkedin.com/oauth/v2/authorization";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://www.linkedin.com/oauth/v2/accessToken";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.linkedin.com/v2/me";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://www.linkedin.com/oauth/v2/accessToken";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.LINKEDIN.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 美团.
|
||||
/// </summary>
|
||||
public class MeituanAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://openapi.waimai.meituan.com/oauth/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://openapi.waimai.meituan.com/oauth/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://openapi.waimai.meituan.com/oauth/userinfo";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://openapi.waimai.meituan.com/oauth/refresh_token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.MEITUAN.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 微软.
|
||||
/// </summary>
|
||||
public class MicrosoftAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://graph.microsoft.com/v1.0/me";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://login.microsoftonline.com/common/oauth2/v2.0/token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.MICROSOFT.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// OSChina开源中国.
|
||||
/// </summary>
|
||||
public class OschinaAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://www.oschina.net/action/oauth2/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://www.oschina.net/action/openapi/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://www.oschina.net/action/openapi/user";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.OSCHINA.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Pinterest.
|
||||
/// </summary>
|
||||
public class PinterestAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://api.pinterest.com/oauth";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://api.pinterest.com/v1/oauth/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.pinterest.com/v1/me";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.PINTEREST.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 腾讯QQ.
|
||||
/// </summary>
|
||||
public class QQAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://graph.qq.com/oauth2.0/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://graph.qq.com/oauth2.0/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://graph.qq.com/user/get_user_info";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://graph.qq.com/oauth2.0/token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.QQ.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 人人网.
|
||||
/// </summary>
|
||||
public class RenrenAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://graph.renren.com/oauth/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://graph.renren.com/oauth/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.renren.com/v2/user/get";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://graph.renren.com/oauth/token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.RENREN.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Stack Overflow.
|
||||
/// </summary>
|
||||
public class StackOverflowAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://stackoverflow.com/oauth";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://stackoverflow.com/oauth/access_token/json";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.stackexchange.com/2.2/me";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.STACK_OVERFLOW.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 淘宝.
|
||||
/// </summary>
|
||||
public class TaobaoAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://oauth.taobao.com/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://oauth.taobao.com/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.TAOBAO.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Teambition.
|
||||
/// </summary>
|
||||
public class TeambitionAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://account.teambition.com/oauth2/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://account.teambition.com/oauth2/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.teambition.com/users/me";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://account.teambition.com/oauth2/refresh_token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.TEAMBITION.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 今日头条.
|
||||
/// </summary>
|
||||
public class ToutiaoAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://open.snssdk.com/auth/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://open.snssdk.com/auth/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://open.snssdk.com/data/user_profile";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.TOUTIAO.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// Twitter.
|
||||
/// </summary>
|
||||
public class TwitterAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://api.twitter.com/oauth/authenticate";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://api.twitter.com/oauth/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.twitter.com/1.1/users/show.json";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.TWITTER.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 企业微信.
|
||||
/// </summary>
|
||||
public class WechatEnterpriseAuthSource : IAuthSource
|
||||
{
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
|
||||
}
|
||||
|
||||
public string authorize()
|
||||
{
|
||||
//return "https://open.work.weixin.qq.com/wwopen/sso/qrConnect";
|
||||
return "https://open.weixin.qq.com/connect/oauth2/authorize";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.WECHAT_ENTERPRISE.ToString();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 企业微信扫码.
|
||||
/// </summary>
|
||||
public class WechatEnterpriseScanAuthSource : IAuthSource
|
||||
{
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://qyapi.weixin.qq.com/cgi-bin/gettoken";
|
||||
}
|
||||
|
||||
public string authorize()
|
||||
{
|
||||
return "https://open.work.weixin.qq.com/wwopen/sso/qrConnect";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.WECHAT_ENTERPRISE_SCAN.ToString();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
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";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 微信开放平台.
|
||||
/// </summary>
|
||||
public class WechatOpenAuthSource : IAuthSource
|
||||
{
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://api.weixin.qq.com/sns/oauth2/access_token";
|
||||
}
|
||||
|
||||
public string authorize()
|
||||
{
|
||||
return "https://open.weixin.qq.com/connect/qrconnect";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.WECHAT_OPEN.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";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 微博.
|
||||
/// </summary>
|
||||
public class WeiboAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://api.weibo.com/oauth2/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://api.weibo.com/oauth2/access_token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://api.weibo.com/2/users/show.json";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
return "https://api.weibo.com/oauth2/revokeoauth2";
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.WEIBO.ToString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using JNPF.Extras.CollectiveOAuth.Enums;
|
||||
|
||||
namespace JNPF.Extras.CollectiveOAuth.Config;
|
||||
|
||||
/// <summary>
|
||||
/// 小米开放平台.
|
||||
/// </summary>
|
||||
public class XiaoMiAuthSource : IAuthSource
|
||||
{
|
||||
public string authorize()
|
||||
{
|
||||
return "https://account.xiaomi.com/oauth2/authorize";
|
||||
}
|
||||
|
||||
public string accessToken()
|
||||
{
|
||||
return "https://account.xiaomi.com/oauth2/token";
|
||||
}
|
||||
|
||||
public string userInfo()
|
||||
{
|
||||
return "https://open.account.xiaomi.com/user/profile";
|
||||
}
|
||||
|
||||
public string revoke()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public string refresh()
|
||||
{
|
||||
return "https://account.xiaomi.com/oauth2/token";
|
||||
}
|
||||
|
||||
public string getName()
|
||||
{
|
||||
return DefaultAuthSourceEnum.XIAOMI.ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user