https://github.com/jxnkwlp/microsoft.owin.security.qq-webchat
QQ and Webchat extensions for Microsoft.Owin.Security
https://github.com/jxnkwlp/microsoft.owin.security.qq-webchat
oath2 owin qq webchat
Last synced: about 2 months ago
JSON representation
QQ and Webchat extensions for Microsoft.Owin.Security
- Host: GitHub
- URL: https://github.com/jxnkwlp/microsoft.owin.security.qq-webchat
- Owner: jxnkwlp
- License: mit
- Created: 2016-10-14T09:05:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-08-31T22:08:26.000Z (about 3 years ago)
- Last Synced: 2024-03-18T00:10:46.619Z (over 1 year ago)
- Topics: oath2, owin, qq, webchat
- Language: C#
- Homepage:
- Size: 424 KB
- Stars: 20
- Watchers: 5
- Forks: 16
- Open Issues: 12
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Microsoft.Owin.Security Extensions
QQ and Webchat extensions for Microsoft.Owin.Security
> # For dotnet core 1.1 and 2.0
> https://github.com/jxnkwlp/AspNetCore.AuthenticationQQ-WebChat
## Get Started
- Webchat
``` csharp
// config
app.UseWeixinAuthentication("[you appId]", "[you app Secret]");
// get external login info
var weixinInfo = await AuthenticationManager.GetExternalWeixinLoginInfoAsync();
```
- Webchat MP
``` csharp
// mp config
app.UseWeixinAuthentication(new WeixinMPAuthenticationOptions{
AppId = "[you appId]",
AppSecret = "[you app Secret]"
});
// get external login info
var weixinInfo = await AuthenticationManager.GetExternalWeixinLoginInfoAsync();
```
- QQ
``` csharp
// config
app.UseQQAuthentication("[you appId]", "[you app Secret]");
// get external login info
var qqInfo = await AuthenticationManager.GetExternalQQLoginInfoAsync();
```
# Microsoft.Owin.Security 扩展
QQ 和微信 Owin 扩展
## 使用方法
- 微信
``` csharp
// 配置
app.UseWeixinAuthentication("[you appId]", "[you app Secret]");
// 获取微信登录者信息
var weixinInfo = await AuthenticationManager.GetExternalWeixinLoginInfoAsync();
```
- 微信公众号
``` csharp
// 配置
app.UseWeixinAuthentication(new WeixinMPAuthenticationOptions{
AppId = "[you appId]",
AppSecret = "[you app Secret]"
});
// 获取微信登录者信息
var weixinInfo = await AuthenticationManager.GetExternalWeixinLoginInfoAsync();
```
- QQ
``` csharp
// 配置
app.UseQQAuthentication("[you appId]", "[you app Secret]");
// 获取QQ登录者信息
var qqInfo = await AuthenticationManager.GetExternalQQLoginInfoAsync();
```