# Microsoft.Owin.Security.Tencent **Repository Path**: xsolution/MicrosoftOwinSecurity.Tencent ## Basic Information - **Project Name**: Microsoft.Owin.Security.Tencent - **Description**: weixin 和 QQ owin 集成登录 - **Primary Language**: C# - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 12 - **Created**: 2021-11-13 - **Last Updated**: 2021-11-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Microsoft.Owin.Security Extensions QQ and Webchat extensions for Microsoft.Owin.Security > # For dotnet core 1.1 and 2.0 > [AspNetCore.AuthenticationQQ-WebChat](https://gitee.com/PassingWind/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(); ```