├── .vs ├── OwinOAuthProviders │ └── v14 │ │ └── .suo └── config │ └── applicationhost.config ├── Microsoft.Owin.Security.Sina ├── Constants.cs ├── Microsoft.Owin.Security.Sina.1.1.0.0.nupkg ├── Microsoft.Owin.Security.Sina.csproj ├── Microsoft.Owin.Security.Sina.csproj.user ├── Microsoft.Owin.Security.Sina.csproj.vspscc ├── Microsoft.Owin.Security.Sina.nuspec ├── Properties │ └── AssemblyInfo.cs ├── Provider │ ├── ISinaAuthenticationProvider.cs │ ├── SinaAuthenticatedContext.cs │ ├── SinaAuthenticationProvider.cs │ └── SinaReturnEndpointContext.cs ├── Resources.Designer.cs ├── Resources.resx ├── SinaAuthenticationExtensions.cs ├── SinaAuthenticationHandler.cs ├── SinaAuthenticationMiddleware.cs ├── SinaAuthenticationOptions.cs ├── bin │ ├── Debug │ │ ├── Microsoft.Owin.Security.Sina.dll │ │ ├── Microsoft.Owin.Security.Sina.pdb │ │ ├── Microsoft.Owin.Security.dll │ │ ├── Microsoft.Owin.Security.xml │ │ ├── Microsoft.Owin.dll │ │ ├── Microsoft.Owin.xml │ │ ├── Newtonsoft.Json.dll │ │ ├── Newtonsoft.Json.xml │ │ └── Owin.dll │ └── Release │ │ ├── Microsoft.Owin.Security.Sina.dll │ │ ├── Microsoft.Owin.Security.Sina.pdb │ │ ├── Microsoft.Owin.Security.dll │ │ ├── Microsoft.Owin.Security.xml │ │ ├── Microsoft.Owin.dll │ │ ├── Microsoft.Owin.xml │ │ ├── Newtonsoft.Json.dll │ │ ├── Newtonsoft.Json.xml │ │ └── Owin.dll ├── obj │ ├── Debug │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── Microsoft.Owin.Security.Sina.Resources.resources │ │ ├── Microsoft.Owin.Security.Sina.csproj.FileListAbsolute.txt │ │ ├── Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache │ │ ├── Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache │ │ ├── Microsoft.Owin.Security.Sina.dll │ │ ├── Microsoft.Owin.Security.Sina.pdb │ │ ├── TempPE │ │ │ └── Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── Release │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── Microsoft.Owin.Security.Sina.Resources.resources │ │ ├── Microsoft.Owin.Security.Sina.csproj.FileListAbsolute.txt │ │ ├── Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache │ │ ├── Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache │ │ ├── Microsoft.Owin.Security.Sina.dll │ │ ├── Microsoft.Owin.Security.Sina.pdb │ │ ├── TempPE │ │ └── Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs └── packages.config ├── Microsoft.Owin.Security.Tencent ├── Constants.cs ├── Microsoft.Owin.Security.Tencent.1.1.0.0.nupkg ├── Microsoft.Owin.Security.Tencent.csproj ├── Microsoft.Owin.Security.Tencent.csproj.user ├── Microsoft.Owin.Security.Tencent.csproj.vspscc ├── Microsoft.Owin.Security.Tencent.nuspec ├── Properties │ └── AssemblyInfo.cs ├── Provider │ ├── ITencentAuthenticationProvider.cs │ ├── TencentAuthenticatedContext.cs │ ├── TencentAuthenticationProvider.cs │ └── TencentReturnEndpointContext.cs ├── Resources.Designer.cs ├── Resources.resx ├── TencentAuthenticationExtensions.cs ├── TencentAuthenticationHandler.cs ├── TencentAuthenticationMiddleware.cs ├── TencentAuthenticationOptions.cs ├── bin │ ├── Debug │ │ ├── Microsoft.Owin.Security.Tencent.dll │ │ ├── Microsoft.Owin.Security.Tencent.pdb │ │ ├── Microsoft.Owin.Security.dll │ │ ├── Microsoft.Owin.Security.xml │ │ ├── Microsoft.Owin.dll │ │ ├── Microsoft.Owin.xml │ │ ├── Newtonsoft.Json.dll │ │ ├── Newtonsoft.Json.xml │ │ └── Owin.dll │ └── Release │ │ ├── Microsoft.Owin.Security.Tencent.dll │ │ ├── Microsoft.Owin.Security.Tencent.pdb │ │ ├── Microsoft.Owin.Security.dll │ │ ├── Microsoft.Owin.Security.xml │ │ ├── Microsoft.Owin.dll │ │ ├── Microsoft.Owin.xml │ │ ├── Newtonsoft.Json.dll │ │ ├── Newtonsoft.Json.xml │ │ └── Owin.dll ├── obj │ ├── Debug │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── Microsoft.Owin.Security.Tencent.Resources.resources │ │ ├── Microsoft.Owin.Security.Tencent.csproj.FileListAbsolute.txt │ │ ├── Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache │ │ ├── Microsoft.Owin.Security.Tencent.csprojResolveAssemblyReference.cache │ │ ├── Microsoft.Owin.Security.Tencent.dll │ │ ├── Microsoft.Owin.Security.Tencent.pdb │ │ ├── TempPE │ │ │ └── Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── Release │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── Microsoft.Owin.Security.Tencent.Resources.resources │ │ ├── Microsoft.Owin.Security.Tencent.csproj.FileListAbsolute.txt │ │ ├── Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache │ │ ├── Microsoft.Owin.Security.Tencent.dll │ │ ├── Microsoft.Owin.Security.Tencent.pdb │ │ ├── TempPE │ │ └── Resources.Designer.cs.dll │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs └── packages.config ├── OwinOAuthProviders.sln ├── OwinOAuthProvidersDemo ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── RouteConfig.cs │ └── Startup.Auth.cs ├── Content │ ├── Site.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ └── bootstrap.min.css ├── Controllers │ ├── AccountController.cs │ └── HomeController.cs ├── Global.asax ├── Global.asax.cs ├── Models │ ├── AccountViewModels.cs │ └── IdentityModels.cs ├── OwinOAuthProvidersDemo.csproj ├── OwinOAuthProvidersDemo.csproj.user ├── OwinOAuthProvidersDemo.csproj.vspscc ├── Project_Readme.html ├── Properties │ ├── AssemblyInfo.cs │ └── PublishProfiles │ │ ├── Default Settings (2).pubxml │ │ └── Default Settings.pubxml ├── Scripts │ ├── _references.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-2.1.1.intellisense.js │ ├── jquery-2.1.1.js │ ├── jquery-2.1.1.min.js │ ├── jquery-2.1.1.min.map │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── modernizr-2.6.2.js │ ├── modernizr-2.7.2.js │ ├── respond.js │ ├── respond.matchmedia.addListener.js │ ├── respond.matchmedia.addListener.min.js │ └── respond.min.js ├── Startup.cs ├── Views │ ├── Account │ │ ├── ExternalLoginConfirmation.cshtml │ │ ├── ExternalLoginFailure.cshtml │ │ ├── Login.cshtml │ │ ├── Manage.cshtml │ │ ├── Register.cshtml │ │ ├── _ChangePasswordPartial.cshtml │ │ ├── _ExternalLoginsListPartial.cshtml │ │ ├── _RemoveAccountPartial.cshtml │ │ └── _SetPasswordPartial.cshtml │ ├── Home │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _Layout.cshtml │ │ └── _LoginPartial.cshtml │ ├── Web.config │ └── _ViewStart.cshtml ├── Web.Debug.config ├── Web.Release.config ├── Web.config ├── bin │ ├── Antlr3.Runtime.dll │ ├── Antlr3.Runtime.pdb │ ├── EntityFramework.SqlServer.dll │ ├── EntityFramework.SqlServer.xml │ ├── EntityFramework.dll │ ├── EntityFramework.xml │ ├── Microsoft.AspNet.Identity.Core.dll │ ├── Microsoft.AspNet.Identity.Core.xml │ ├── Microsoft.AspNet.Identity.EntityFramework.dll │ ├── Microsoft.AspNet.Identity.EntityFramework.xml │ ├── Microsoft.AspNet.Identity.Owin.dll │ ├── Microsoft.AspNet.Identity.Owin.xml │ ├── Microsoft.Owin.Host.SystemWeb.dll │ ├── Microsoft.Owin.Host.SystemWeb.xml │ ├── Microsoft.Owin.Security.Cookies.dll │ ├── Microsoft.Owin.Security.Cookies.xml │ ├── Microsoft.Owin.Security.Facebook.dll │ ├── Microsoft.Owin.Security.Google.dll │ ├── Microsoft.Owin.Security.MicrosoftAccount.dll │ ├── Microsoft.Owin.Security.OAuth.dll │ ├── Microsoft.Owin.Security.OAuth.xml │ ├── Microsoft.Owin.Security.Sina.dll │ ├── Microsoft.Owin.Security.Sina.pdb │ ├── Microsoft.Owin.Security.Tencent.dll │ ├── Microsoft.Owin.Security.Tencent.pdb │ ├── Microsoft.Owin.Security.Twitter.dll │ ├── Microsoft.Owin.Security.dll │ ├── Microsoft.Owin.Security.xml │ ├── Microsoft.Owin.dll │ ├── Microsoft.Owin.xml │ ├── Microsoft.Web.Infrastructure.dll │ ├── Newtonsoft.Json.dll │ ├── Newtonsoft.Json.xml │ ├── Owin.dll │ ├── OwinOAuthProvidersDemo.dll │ ├── OwinOAuthProvidersDemo.dll.config │ ├── OwinOAuthProvidersDemo.pdb │ ├── System.Web.Helpers.dll │ ├── System.Web.Helpers.xml │ ├── System.Web.Mvc.dll │ ├── System.Web.Mvc.xml │ ├── System.Web.Optimization.dll │ ├── System.Web.Optimization.xml │ ├── System.Web.Razor.dll │ ├── System.Web.Razor.xml │ ├── System.Web.WebPages.Deployment.dll │ ├── System.Web.WebPages.Deployment.xml │ ├── System.Web.WebPages.Razor.dll │ ├── System.Web.WebPages.Razor.xml │ ├── System.Web.WebPages.dll │ ├── System.Web.WebPages.xml │ └── WebGrease.dll ├── favicon.ico ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── obj │ ├── Debug │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── OwinOAuthProvidersDemo.csproj.FileListAbsolute.txt │ │ ├── OwinOAuthProvidersDemo.csprojResolveAssemblyReference.cache │ │ ├── OwinOAuthProvidersDemo.dll │ │ ├── OwinOAuthProvidersDemo.pdb │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ └── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ └── Release │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ └── build.force └── packages.config ├── README.md └── packages ├── Antlr.3.5.0.2 ├── Antlr.3.5.0.2.nupkg └── lib │ ├── Antlr3.Runtime.dll │ └── Antlr3.Runtime.pdb ├── EntityFramework.6.1.1 ├── EntityFramework.6.1.1.nupkg ├── content │ ├── App.config.transform │ └── Web.config.transform ├── lib │ ├── net40 │ │ ├── EntityFramework.SqlServer.dll │ │ ├── EntityFramework.SqlServer.xml │ │ ├── EntityFramework.dll │ │ └── EntityFramework.xml │ └── net45 │ │ ├── EntityFramework.SqlServer.dll │ │ ├── EntityFramework.SqlServer.xml │ │ ├── EntityFramework.dll │ │ └── EntityFramework.xml └── tools │ ├── EntityFramework.PowerShell.Utility.dll │ ├── EntityFramework.PowerShell.dll │ ├── EntityFramework.psd1 │ ├── EntityFramework.psm1 │ ├── about_EntityFramework.help.txt │ ├── init.ps1 │ ├── install.ps1 │ └── migrate.exe ├── Microsoft.AspNet.Identity.Core.2.2.1 ├── Microsoft.AspNet.Identity.Core.2.2.1.nupkg └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.Core.dll │ └── Microsoft.AspNet.Identity.Core.xml ├── Microsoft.AspNet.Identity.EntityFramework.2.1.0 ├── Microsoft.AspNet.Identity.EntityFramework.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.EntityFramework.dll │ └── Microsoft.AspNet.Identity.EntityFramework.xml ├── Microsoft.AspNet.Identity.Owin.2.2.1 ├── Microsoft.AspNet.Identity.Owin.2.2.1.nupkg └── lib │ └── net45 │ ├── Microsoft.AspNet.Identity.Owin.dll │ └── Microsoft.AspNet.Identity.Owin.xml ├── Microsoft.AspNet.Mvc.5.2.0 ├── Content │ ├── Web.config.install.xdt │ └── Web.config.uninstall.xdt ├── Microsoft.AspNet.Mvc.5.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Mvc.dll │ └── System.Web.Mvc.xml ├── Microsoft.AspNet.Razor.3.2.0 ├── Microsoft.AspNet.Razor.3.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Razor.dll │ └── System.Web.Razor.xml ├── Microsoft.AspNet.Web.Optimization.1.1.3 ├── Microsoft.AspNet.Web.Optimization.1.1.3.nupkg └── lib │ └── net40 │ ├── System.Web.Optimization.dll │ └── system.web.optimization.xml ├── Microsoft.AspNet.WebPages.3.2.0 ├── Content │ ├── Web.config.install.xdt │ └── Web.config.uninstall.xdt ├── Microsoft.AspNet.WebPages.3.2.0.nupkg └── lib │ └── net45 │ ├── System.Web.Helpers.dll │ ├── System.Web.Helpers.xml │ ├── System.Web.WebPages.Deployment.dll │ ├── System.Web.WebPages.Deployment.xml │ ├── System.Web.WebPages.Razor.dll │ ├── System.Web.WebPages.Razor.xml │ ├── System.Web.WebPages.dll │ └── System.Web.WebPages.xml ├── Microsoft.Owin.2.1.0 ├── Microsoft.Owin.2.1.0.nupkg └── lib │ ├── net40 │ ├── Microsoft.Owin.XML │ └── Microsoft.Owin.dll │ └── net45 │ ├── Microsoft.Owin.XML │ └── Microsoft.Owin.dll ├── Microsoft.Owin.3.0.1 ├── Microsoft.Owin.3.0.1.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.XML │ └── Microsoft.Owin.dll ├── Microsoft.Owin.Host.SystemWeb.3.0.1 ├── Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Host.SystemWeb.dll │ └── Microsoft.Owin.Host.SystemWeb.xml ├── Microsoft.Owin.Security.2.1.0 ├── Microsoft.Owin.Security.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.XML │ └── Microsoft.Owin.Security.dll ├── Microsoft.Owin.Security.Cookies.2.1.0 ├── Microsoft.Owin.Security.Cookies.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.Cookies.dll │ └── Microsoft.Owin.Security.Cookies.xml ├── Microsoft.Owin.Security.OAuth.2.1.0 ├── Microsoft.Owin.Security.OAuth.2.1.0.nupkg └── lib │ └── net45 │ ├── Microsoft.Owin.Security.OAuth.XML │ └── Microsoft.Owin.Security.OAuth.dll ├── Microsoft.Web.Infrastructure.1.0.0.0 ├── Microsoft.Web.Infrastructure.1.0.0.0.nupkg └── lib │ └── net40 │ └── Microsoft.Web.Infrastructure.dll ├── Microsoft.jQuery.Unobtrusive.Validation.3.2.0 ├── Content │ └── Scripts │ │ ├── jquery.validate.unobtrusive.js │ │ └── jquery.validate.unobtrusive.min.js └── Microsoft.jQuery.Unobtrusive.Validation.3.2.0.nupkg ├── Modernizr.2.7.2 ├── Content │ └── Scripts │ │ └── modernizr-2.7.2.js ├── Modernizr.2.7.2.nupkg └── Tools │ ├── common.ps1 │ ├── install.ps1 │ └── uninstall.ps1 ├── Newtonsoft.Json.6.0.4 ├── Newtonsoft.Json.6.0.4.nupkg ├── lib │ ├── net20 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net35 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net40 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── netcore45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── portable-net40+sl5+wp80+win8+wpa81 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ └── portable-net45+wp80+win8+wpa81 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml └── tools │ └── install.ps1 ├── Newtonsoft.Json.6.0.8 ├── Newtonsoft.Json.6.0.8.nupkg ├── lib │ ├── net20 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net35 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net40 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── net45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── netcore45 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ ├── portable-net40+sl5+wp80+win8+wpa81 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml │ └── portable-net45+wp80+win8+wpa81+aspnetcore50 │ │ ├── Newtonsoft.Json.dll │ │ └── Newtonsoft.Json.xml └── tools │ └── install.ps1 ├── Owin.1.0 ├── Owin.1.0.nupkg └── lib │ └── net40 │ └── Owin.dll ├── Respond.1.4.2 ├── Respond.1.4.2.nupkg └── content │ └── Scripts │ ├── respond.js │ ├── respond.matchmedia.addListener.js │ ├── respond.matchmedia.addListener.min.js │ └── respond.min.js ├── WebGrease.1.6.0 ├── WebGrease.1.6.0.nupkg ├── lib │ └── WebGrease.dll └── tools │ └── WG.EXE ├── bootstrap.3.2.0 ├── bootstrap.3.2.0.nupkg └── content │ ├── Content │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ └── bootstrap.min.css │ ├── Scripts │ ├── bootstrap.js │ └── bootstrap.min.js │ └── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── jQuery.2.1.1 ├── Content │ └── Scripts │ │ ├── jquery-2.1.1-vsdoc.js │ │ ├── jquery-2.1.1.js │ │ ├── jquery-2.1.1.min.js │ │ └── jquery-2.1.1.min.map ├── Tools │ ├── common.ps1 │ ├── install.ps1 │ ├── jquery-2.1.1.intellisense.js │ └── uninstall.ps1 └── jQuery.2.1.1.nupkg └── jQuery.Validation.1.13.0 ├── Content └── Scripts │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ └── jquery.validate.min.js └── jQuery.Validation.1.13.0.nupkg /.vs/OwinOAuthProviders/v14/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/.vs/OwinOAuthProviders/v14/.suo -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Constants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Owin.Security.Sina 8 | { 9 | internal static class Constants 10 | { 11 | public const string DefaultAuthenticationType = "Sina"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Microsoft.Owin.Security.Sina.1.1.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/Microsoft.Owin.Security.Sina.1.1.0.0.nupkg -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Microsoft.Owin.Security.Sina.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ShowAllFiles 5 | 6 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Microsoft.Owin.Security.Sina.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Microsoft.Owin.Security.Sina.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin.Security.Sina 5 | 1.1.0.0 6 | Microsoft.Owin.Security.Sina 7 | xiaoyaojian@126.com 8 | xiaoyaojian@126.com 9 | http://www.apache.org/licenses/LICENSE-2.0.html 10 | https://github.com/xiaoyaojian/OwinAuthProvider 11 | http://www.sinaimg.cn/blog/developer/wiki/LOGO_64x64.png 12 | false 13 | Sina open authentication provider for asp.net 14 | Copyright 2015 15 | Sina OAuth asp.net Provider 16 | 17 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Microsoft.Owin.Security.Sina")] 9 | [assembly: AssemblyDescription("Sina open authentication provider")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Microsoft.Owin.Security.Sina")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("b991e1c2-b9e8-45fd-8f08-2c9effb8e0df")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.1.0.0")] 36 | [assembly: AssemblyFileVersion("1.1.0.0")] 37 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Provider/ISinaAuthenticationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Owin.Security.Sina.Provider 8 | { 9 | /// 10 | /// Specifies callback methods which the invokes to enable developer control over the authentication process. /> 11 | /// 12 | public interface ISinaAuthenticationProvider 13 | { 14 | /// 15 | /// Invoked whenever Sina succesfully authenticates a user 16 | /// 17 | /// Contains information about the login session as well as the user . 18 | /// A representing the completed operation. 19 | Task Authenticated(SinaAuthenticatedContext context); 20 | 21 | /// 22 | /// Invoked prior to the being saved in a local cookie and the browser being redirected to the originally requested URL. 23 | /// 24 | /// 25 | /// A representing the completed operation. 26 | Task ReturnEndpoint(SinaReturnEndpointContext context); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Provider/SinaAuthenticatedContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Microsoft.Owin.Security; 3 | using Microsoft.Owin.Security.Provider; 4 | using Newtonsoft.Json.Linq; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Security.Claims; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace Microsoft.Owin.Security.Sina.Provider 13 | { 14 | /// 15 | /// Contains information about the login session as well as the user . 16 | /// 17 | public class SinaAuthenticatedContext : BaseContext 18 | { 19 | /// 20 | /// Initializes a 21 | /// 22 | /// The OWIN environment 23 | /// The JSON-serialized user 24 | /// Sina Access token 25 | public SinaAuthenticatedContext(IOwinContext context, JObject user, string accessToken, int expiresIn) 26 | : base(context) 27 | { 28 | AccessToken = accessToken; 29 | User = user; 30 | ExpiresIn = TimeSpan.FromSeconds(expiresIn); 31 | 32 | Id = TryGetValue(user, "uid"); 33 | Name = TryGetValue(user, "displayName"); 34 | Email = TryGetValue(user, "emailAddress"); 35 | Alias = TryGetValue(user, "publicAlias"); 36 | } 37 | 38 | /// 39 | /// Gets the JSON-serialized user 40 | /// 41 | /// 42 | /// Contains the Sina user obtained from the endpoint https://api.weibo.com/oauth2/get_token_info 43 | /// 44 | public JObject User { get; private set; } 45 | 46 | /// 47 | /// Gets the Sina OAuth access token 48 | /// 49 | public string AccessToken { get; private set; } 50 | 51 | /// 52 | /// Gets the Sina access token expiration time 53 | /// 54 | public TimeSpan? ExpiresIn { get; set; } 55 | 56 | /// 57 | /// Get the user's id 58 | /// 59 | public string Id { get; private set; } 60 | 61 | /// 62 | /// Get the user's displayName 63 | /// 64 | public string Name { get; private set; } 65 | 66 | /// 67 | /// Get the user's email 68 | /// 69 | public string Email { get; private set; } 70 | 71 | /// 72 | /// Get the user's publicAlias 73 | /// 74 | public string Alias { get; private set; } 75 | 76 | /// 77 | /// Gets the representing the user 78 | /// 79 | public ClaimsIdentity Identity { get; set; } 80 | 81 | /// 82 | /// Gets or sets a property bag for common authentication properties 83 | /// 84 | public AuthenticationProperties Properties { get; set; } 85 | 86 | private static string TryGetValue(JObject user, string propertyName) { 87 | JToken value; 88 | return user.TryGetValue(propertyName, out value) ? value.ToString() : null; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Provider/SinaAuthenticationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Owin.Security.Sina.Provider 8 | { 9 | /// 10 | /// Default implementation. 11 | /// 12 | public class SinaAuthenticationProvider:ISinaAuthenticationProvider 13 | { 14 | /// 15 | /// Gets or sets the function that is invoked when the Authenticated method is invoked. 16 | /// 17 | public Func OnAuthenticated { get; set; } 18 | 19 | /// 20 | /// Gets or sets the function that is invoked when the ReturnEndpoint method is invoked. 21 | /// 22 | public Func OnReturnEndpoint { get; set; } 23 | 24 | 25 | /// 26 | /// Initializes a 27 | /// 28 | public SinaAuthenticationProvider() 29 | { 30 | OnAuthenticated = context => Task.FromResult(null); 31 | OnReturnEndpoint = context => Task.FromResult(null); 32 | } 33 | 34 | /// 35 | /// Invoked whenever sina succesfully authenticates a user 36 | /// 37 | /// Contains information about the login session as well as the user . 38 | /// A representing the completed operation. 39 | public virtual Task Authenticated(SinaAuthenticatedContext context) 40 | { 41 | return OnAuthenticated(context); 42 | } 43 | 44 | /// 45 | /// Invoked prior to the being saved in a local cookie and the browser being redirected to the originally requested URL. 46 | /// 47 | /// 48 | /// A representing the completed operation. 49 | public virtual Task ReturnEndpoint(SinaReturnEndpointContext context) 50 | { 51 | return OnReturnEndpoint(context); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Provider/SinaReturnEndpointContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Microsoft.Owin.Security; 3 | using Microsoft.Owin.Security.Provider; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Microsoft.Owin.Security.Sina.Provider 11 | { 12 | public class SinaReturnEndpointContext : ReturnEndpointContext 13 | { 14 | /// 15 | /// 16 | /// 17 | /// OWIN environment 18 | /// The authentication ticket 19 | public SinaReturnEndpointContext( 20 | IOwinContext context, 21 | AuthenticationTicket ticket) 22 | : base(context, ticket) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.0 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Microsoft.Owin.Security.Sina { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Owin.Security.Sina.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to The '{0}' option must be provided.. 65 | /// 66 | internal static string Exception_OptionMustBeProvided { 67 | get { 68 | return ResourceManager.GetString("Exception_OptionMustBeProvided", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.. 74 | /// 75 | internal static string Exception_ValidatorHandlerMismatch { 76 | get { 77 | return ResourceManager.GetString("Exception_ValidatorHandlerMismatch", resourceCulture); 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/SinaAuthenticationExtensions.cs: -------------------------------------------------------------------------------- 1 | using Owin; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Microsoft.Owin.Security.Sina 9 | { 10 | public static class SinaAuthenticationExtensions 11 | { 12 | public static IAppBuilder UseSinaAuthentication(this IAppBuilder app, SinaAuthenticationOptions options) 13 | { 14 | if (app == null) throw new ArgumentNullException("app"); 15 | if (options == null) throw new ArgumentNullException("options"); 16 | 17 | app.Use(typeof(SinaAuthenticationMiddleware), app, options); 18 | 19 | return app; 20 | } 21 | 22 | public static IAppBuilder UseSinaAuthentication(this IAppBuilder app, string appId, string appSecret) 23 | { 24 | return app.UseSinaAuthentication(new SinaAuthenticationOptions 25 | { 26 | AppId = appId, 27 | AppSecret = appSecret, 28 | Schema = "https" 29 | }); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/SinaAuthenticationMiddleware.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Microsoft.Owin.Logging; 3 | using Microsoft.Owin.Security.DataHandler; 4 | using Microsoft.Owin.Security.DataProtection; 5 | using Microsoft.Owin.Security.Infrastructure; 6 | using Microsoft.Owin.Security.Sina.Provider; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Globalization; 10 | using System.Linq; 11 | using System.Net.Http; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | using Microsoft.Owin.Security; 15 | using Owin; 16 | 17 | namespace Microsoft.Owin.Security.Sina 18 | { 19 | public class SinaAuthenticationMiddleware : AuthenticationMiddleware 20 | { 21 | private readonly HttpClient httpClient; 22 | private readonly ILogger logger; 23 | 24 | 25 | public SinaAuthenticationMiddleware(OwinMiddleware next, IAppBuilder app, SinaAuthenticationOptions options) 26 | : base(next, options) 27 | { 28 | if (String.IsNullOrWhiteSpace(Options.AppId)) 29 | throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 30 | Resources.Exception_OptionMustBeProvided, "ClientId")); 31 | if (String.IsNullOrWhiteSpace(Options.AppSecret)) 32 | throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 33 | Resources.Exception_OptionMustBeProvided, "ClientSecret")); 34 | 35 | logger = app.CreateLogger(); 36 | 37 | if (Options.Provider == null) 38 | Options.Provider = new SinaAuthenticationProvider(); 39 | 40 | if (Options.StateDataFormat == null) 41 | { 42 | IDataProtector dataProtector = app.CreateDataProtector( 43 | typeof (SinaAuthenticationMiddleware).FullName, 44 | Options.AuthenticationType, "v2"); 45 | Options.StateDataFormat = new PropertiesDataFormat(dataProtector); 46 | } 47 | 48 | if (String.IsNullOrEmpty(Options.SignInAsAuthenticationType)) 49 | Options.SignInAsAuthenticationType = app.GetDefaultSignInAsAuthenticationType(); 50 | 51 | httpClient = new HttpClient(ResolveHttpMessageHandler(Options)) 52 | { 53 | Timeout = Options.BackchannelTimeout, 54 | MaxResponseContentBufferSize = 1024*1024*10, 55 | }; 56 | httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("Sina middleware"); 57 | httpClient.DefaultRequestHeaders.ExpectContinue = false; 58 | } 59 | 60 | /// 61 | /// Provides the object for processing 62 | /// authentication-related requests. 63 | /// 64 | /// 65 | /// An configured with the 66 | /// supplied to the constructor. 67 | /// 68 | protected override AuthenticationHandler CreateHandler() 69 | { 70 | return new SinaAuthenticationHandler(httpClient, logger); 71 | } 72 | 73 | private HttpMessageHandler ResolveHttpMessageHandler(SinaAuthenticationOptions options) 74 | { 75 | HttpMessageHandler handler = options.BackchannelHttpHandler ?? new WebRequestHandler(); 76 | 77 | // If they provided a validator, apply it or fail. 78 | if (options.BackchannelCertificateValidator != null) 79 | { 80 | // Set the cert validate callback 81 | var webRequestHandler = handler as WebRequestHandler; 82 | if (webRequestHandler == null) 83 | { 84 | throw new InvalidOperationException(Resources.Exception_ValidatorHandlerMismatch); 85 | } 86 | webRequestHandler.ServerCertificateValidationCallback = options.BackchannelCertificateValidator.Validate; 87 | } 88 | 89 | return handler; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.Security.Sina.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.Security.Sina.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.Security.Sina.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.Security.Sina.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Debug/Microsoft.Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Debug/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Debug/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Debug/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Debug/Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.Security.Sina.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.Security.Sina.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.Security.Sina.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.Security.Sina.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Release/Microsoft.Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Release/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Release/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/bin/Release/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/bin/Release/Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.Resources.resources -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Microsoft.Owin.Security.Sina.dll 2 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Microsoft.Owin.Security.Sina.pdb 3 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Microsoft.Owin.dll 4 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Microsoft.Owin.Security.dll 5 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Newtonsoft.Json.dll 6 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Owin.dll 7 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Microsoft.Owin.xml 8 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Microsoft.Owin.Security.xml 9 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Debug\Newtonsoft.Json.xml 10 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.Resources.resources 11 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache 12 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.dll 13 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.pdb 14 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache 15 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache 16 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.Resources.resources 17 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache 18 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.dll 19 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Sina\obj\Debug\Microsoft.Owin.Security.Sina.pdb 20 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/Microsoft.Owin.Security.Sina.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/TempPE/Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/TempPE/Resources.Designer.cs.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.Resources.resources -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Microsoft.Owin.Security.Sina.dll 2 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Microsoft.Owin.Security.Sina.pdb 3 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Microsoft.Owin.dll 4 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Microsoft.Owin.Security.dll 5 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Newtonsoft.Json.dll 6 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Owin.dll 7 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Microsoft.Owin.xml 8 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Microsoft.Owin.Security.xml 9 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\bin\Release\Newtonsoft.Json.xml 10 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Release\Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache 11 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Release\Microsoft.Owin.Security.Sina.Resources.resources 12 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Release\Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache 13 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Release\Microsoft.Owin.Security.Sina.dll 14 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Sina\obj\Release\Microsoft.Owin.Security.Sina.pdb 15 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/Microsoft.Owin.Security.Sina.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/TempPE/Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/TempPE/Resources.Designer.cs.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Sina/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Sina/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Constants.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Owin.Security.Tencent 8 | { 9 | internal static class Constants 10 | { 11 | public const string DefaultAuthenticationType = "Tencent"; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Microsoft.Owin.Security.Tencent.1.1.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/Microsoft.Owin.Security.Tencent.1.1.0.0.nupkg -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Microsoft.Owin.Security.Tencent.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ShowAllFiles 5 | 6 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Microsoft.Owin.Security.Tencent.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Microsoft.Owin.Security.Tencent.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Microsoft.Owin.Security.Tencent 5 | 1.1.0.0 6 | Microsoft.Owin.Security.Tencent 7 | xiaoyaojian@126.com 8 | xiaoyaojian@126.com 9 | http://www.apache.org/licenses/LICENSE-2.0.html 10 | https://github.com/xiaoyaojian/OwinAuthProvider 11 | false 12 | Tencent open authentication provider for asp.net 13 | Copyright 2015 14 | Tencent OAuth asp.net Provider 15 | 16 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Microsoft.Owin.Security.Tencent")] 9 | [assembly: AssemblyDescription("Tencent open authentication provider")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Microsoft.Owin.Security.Tencent")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1201a699-b045-4c1a-afcb-f89d1bf95a93")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.1.0.0")] 36 | [assembly: AssemblyFileVersion("1.1.0.0")] 37 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Provider/ITencentAuthenticationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Owin.Security.Tencent.Provider 8 | { 9 | /// 10 | /// Specifies callback methods which the invokes to enable developer control over the authentication process. /> 11 | /// 12 | public interface ITencentAuthenticationProvider 13 | { 14 | /// 15 | /// Invoked whenever Tencent succesfully authenticates a user 16 | /// 17 | /// Contains information about the login session as well as the user . 18 | /// A representing the completed operation. 19 | Task Authenticated(TencentAuthenticatedContext context); 20 | 21 | /// 22 | /// Invoked prior to the being saved in a local cookie and the browser being redirected to the originally requested URL. 23 | /// 24 | /// 25 | /// A representing the completed operation. 26 | Task ReturnEndpoint(TencentReturnEndpointContext context); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Provider/TencentAuthenticatedContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Microsoft.Owin.Security; 3 | using Microsoft.Owin.Security.Provider; 4 | using Newtonsoft.Json.Linq; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Security.Claims; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace Microsoft.Owin.Security.Tencent.Provider 13 | { 14 | /// 15 | /// Contains information about the login session as well as the user . 16 | /// 17 | public class TencentAuthenticatedContext:BaseContext 18 | { 19 | /// 20 | /// Initializes a 21 | /// 22 | /// The OWIN environment 23 | /// The JSON-serialized user 24 | /// Tencent Access token 25 | public TencentAuthenticatedContext(IOwinContext context, JObject user, string accessToken, int expiresIn) 26 | : base(context) 27 | { 28 | AccessToken = accessToken; 29 | User = user; 30 | ExpiresIn = TimeSpan.FromSeconds(expiresIn); 31 | Id = TryGetValue(user, "openid"); 32 | Name = TryGetValue(user, "displayName"); 33 | Email = TryGetValue(user, "emailAddress"); 34 | Alias = TryGetValue(user, "publicAlias"); 35 | } 36 | 37 | /// 38 | /// Gets the JSON-serialized user 39 | /// 40 | /// 41 | /// Contains the Tencent user obtained from the endpoint https://graph.qq.com/oauth2.0/me 42 | /// 43 | public JObject User { get; private set; } 44 | 45 | /// 46 | /// Gets the Tencent OAuth access token 47 | /// 48 | public string AccessToken { get; private set; } 49 | 50 | /// 51 | /// Gets the Tencent access token expiration time 52 | /// 53 | public TimeSpan? ExpiresIn { get; set; } 54 | 55 | /// 56 | /// Get the user's id 57 | /// 58 | public string Id { get; private set; } 59 | 60 | /// 61 | /// Get the user's displayName 62 | /// 63 | public string Name { get; private set; } 64 | 65 | /// 66 | /// Get the user's email 67 | /// 68 | public string Email { get; private set; } 69 | 70 | /// 71 | /// Get the user's publicAlias 72 | /// 73 | public string Alias { get; private set; } 74 | 75 | /// 76 | /// Gets the representing the user 77 | /// 78 | public ClaimsIdentity Identity { get; set; } 79 | 80 | /// 81 | /// Gets or sets a property bag for common authentication properties 82 | /// 83 | public AuthenticationProperties Properties { get; set; } 84 | 85 | private static string TryGetValue(JObject user, string propertyName) 86 | { 87 | JToken value; 88 | return user.TryGetValue(propertyName, out value) ? value.ToString() : null; 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Provider/TencentAuthenticationProvider.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace Microsoft.Owin.Security.Tencent.Provider 8 | { 9 | /// 10 | /// Default implementation. 11 | /// 12 | public class TencentAuthenticationProvider:ITencentAuthenticationProvider 13 | { 14 | // 15 | /// Gets or sets the function that is invoked when the Authenticated method is invoked. 16 | /// 17 | public Func OnAuthenticated { get; set; } 18 | 19 | /// 20 | /// Gets or sets the function that is invoked when the ReturnEndpoint method is invoked. 21 | /// 22 | public Func OnReturnEndpoint { get; set; } 23 | 24 | /// 25 | /// Initializes a 26 | /// 27 | public TencentAuthenticationProvider() 28 | { 29 | OnAuthenticated = context => Task.FromResult(null); 30 | OnReturnEndpoint = context => Task.FromResult(null); 31 | } 32 | 33 | /// 34 | /// Invoked whenever tencent succesfully authenticates a user 35 | /// 36 | /// Contains information about the login session as well as the user . 37 | /// A representing the completed operation. 38 | public Task Authenticated(TencentAuthenticatedContext context) 39 | { 40 | return OnAuthenticated(context); 41 | } 42 | 43 | /// 44 | /// Invoked prior to the being saved in a local cookie and the browser being redirected to the originally requested URL. 45 | /// 46 | /// 47 | /// A representing the completed operation. 48 | public Task ReturnEndpoint(TencentReturnEndpointContext context) 49 | { 50 | return OnReturnEndpoint(context); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Provider/TencentReturnEndpointContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Microsoft.Owin.Security; 3 | using Microsoft.Owin.Security.Provider; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace Microsoft.Owin.Security.Tencent.Provider 11 | { 12 | public class TencentReturnEndpointContext : ReturnEndpointContext 13 | { 14 | /// 15 | /// 16 | /// 17 | /// OWIN environment 18 | /// The authentication ticket 19 | public TencentReturnEndpointContext( 20 | IOwinContext context, 21 | AuthenticationTicket ticket) 22 | : base(context, ticket) 23 | { 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.0 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Microsoft.Owin.Security.Tencent { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Owin.Security.Tencent.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to The '{0}' option must be provided.. 65 | /// 66 | internal static string Exception_OptionMustBeProvided { 67 | get { 68 | return ResourceManager.GetString("Exception_OptionMustBeProvided", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to An ICertificateValidator cannot be specified at the same time as an HttpMessageHandler unless it is a WebRequestHandler.. 74 | /// 75 | internal static string Exception_ValidatorHandlerMismatch { 76 | get { 77 | return ResourceManager.GetString("Exception_ValidatorHandlerMismatch", resourceCulture); 78 | } 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/TencentAuthenticationExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Owin; 7 | 8 | 9 | namespace Microsoft.Owin.Security.Tencent 10 | { 11 | public static class TencentAuthenticationExtensions 12 | { 13 | public static IAppBuilder UseTencentAuthentication(this IAppBuilder app, TencentAuthenticationOptions options) 14 | { 15 | if (app == null) throw new ArgumentNullException("app"); 16 | if (options == null) throw new ArgumentNullException("options"); 17 | 18 | app.Use(typeof(TencentAuthenticationMiddleware), app, options); 19 | 20 | return app; 21 | } 22 | 23 | public static IAppBuilder UseTencentAuthentication(this IAppBuilder app, string appId, string appSecret) 24 | { 25 | return app.UseTencentAuthentication(new TencentAuthenticationOptions 26 | { 27 | AppId = appId, 28 | AppSecret = appSecret, 29 | Schema="https" 30 | }); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/TencentAuthenticationMiddleware.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Owin; 2 | using Microsoft.Owin.Logging; 3 | using Microsoft.Owin.Security.DataHandler; 4 | using Microsoft.Owin.Security.DataProtection; 5 | using Microsoft.Owin.Security.Infrastructure; 6 | using Microsoft.Owin.Security.Tencent.Provider; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Globalization; 10 | using System.Linq; 11 | using System.Net.Http; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | using Microsoft.Owin.Security; 15 | using Owin; 16 | 17 | namespace Microsoft.Owin.Security.Tencent 18 | { 19 | public class TencentAuthenticationMiddleware : AuthenticationMiddleware 20 | { 21 | private readonly HttpClient httpClient; 22 | private readonly ILogger logger; 23 | 24 | 25 | public TencentAuthenticationMiddleware(OwinMiddleware next, IAppBuilder app, TencentAuthenticationOptions options) 26 | : base(next, options) 27 | { 28 | if (String.IsNullOrWhiteSpace(Options.AppId)) 29 | throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 30 | Resources.Exception_OptionMustBeProvided, "ClientId")); 31 | if (String.IsNullOrWhiteSpace(Options.AppSecret)) 32 | throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, 33 | Resources.Exception_OptionMustBeProvided, "ClientSecret")); 34 | 35 | logger = app.CreateLogger(); 36 | 37 | if (Options.Provider == null) 38 | Options.Provider = new TencentAuthenticationProvider(); 39 | 40 | if (Options.StateDataFormat == null) 41 | { 42 | IDataProtector dataProtector = app.CreateDataProtector( 43 | typeof(TencentAuthenticationMiddleware).FullName, 44 | Options.AuthenticationType, "v2"); 45 | Options.StateDataFormat = new PropertiesDataFormat(dataProtector); 46 | } 47 | 48 | if (String.IsNullOrEmpty(Options.SignInAsAuthenticationType)) 49 | Options.SignInAsAuthenticationType = app.GetDefaultSignInAsAuthenticationType(); 50 | 51 | httpClient = new HttpClient(ResolveHttpMessageHandler(Options)) 52 | { 53 | Timeout = Options.BackchannelTimeout, 54 | MaxResponseContentBufferSize = 1024 * 1024 * 10, 55 | }; 56 | httpClient.DefaultRequestHeaders.UserAgent.ParseAdd("Tencent middleware"); 57 | httpClient.DefaultRequestHeaders.ExpectContinue = false; 58 | } 59 | 60 | /// 61 | /// Provides the object for processing 62 | /// authentication-related requests. 63 | /// 64 | /// 65 | /// An configured with the 66 | /// supplied to the constructor. 67 | /// 68 | protected override AuthenticationHandler CreateHandler() 69 | { 70 | return new TencentAuthenticationHandler(httpClient, logger); 71 | } 72 | 73 | private HttpMessageHandler ResolveHttpMessageHandler(TencentAuthenticationOptions options) 74 | { 75 | HttpMessageHandler handler = options.BackchannelHttpHandler ?? new WebRequestHandler(); 76 | 77 | // If they provided a validator, apply it or fail. 78 | if (options.BackchannelCertificateValidator != null) 79 | { 80 | // Set the cert validate callback 81 | var webRequestHandler = handler as WebRequestHandler; 82 | if (webRequestHandler == null) 83 | { 84 | throw new InvalidOperationException(Resources.Exception_ValidatorHandlerMismatch); 85 | } 86 | webRequestHandler.ServerCertificateValidationCallback = options.BackchannelCertificateValidator.Validate; 87 | } 88 | 89 | return handler; 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.Security.Tencent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.Security.Tencent.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.Security.Tencent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.Security.Tencent.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Debug/Microsoft.Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Debug/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Debug/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Debug/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Debug/Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.Security.Tencent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.Security.Tencent.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.Security.Tencent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.Security.Tencent.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Release/Microsoft.Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Release/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Release/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/bin/Release/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/bin/Release/Owin.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.Resources.resources -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.Tencent.dll 2 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.Tencent.pdb 3 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.dll 4 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.dll 5 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Newtonsoft.Json.dll 6 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Owin.dll 7 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.xml 8 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.xml 9 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Debug\Newtonsoft.Json.xml 10 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.csprojResolveAssemblyReference.cache 11 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.Resources.resources 12 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache 13 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.dll 14 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.pdb 15 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.Tencent.dll 16 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.Tencent.pdb 17 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.dll 18 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.dll 19 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Newtonsoft.Json.dll 20 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Owin.dll 21 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.xml 22 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Microsoft.Owin.Security.xml 23 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\bin\Debug\Newtonsoft.Json.xml 24 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.csprojResolveAssemblyReference.cache 25 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.Resources.resources 26 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache 27 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.dll 28 | D:\WorkSpace\Documents\GitHub\OwinOAuthProvider\OwinOAuthProvider\Microsoft.Owin.Security.Tencent\obj\Debug\Microsoft.Owin.Security.Tencent.pdb 29 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/Microsoft.Owin.Security.Tencent.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/TempPE/Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/TempPE/Resources.Designer.cs.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.Resources.resources -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Microsoft.Owin.Security.Tencent.dll 2 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Microsoft.Owin.Security.Tencent.pdb 3 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Microsoft.Owin.dll 4 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Microsoft.Owin.Security.dll 5 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Newtonsoft.Json.dll 6 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Owin.dll 7 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Microsoft.Owin.xml 8 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Microsoft.Owin.Security.xml 9 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\bin\Release\Newtonsoft.Json.xml 10 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Release\Microsoft.Owin.Security.Tencent.Resources.resources 11 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Release\Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache 12 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Release\Microsoft.Owin.Security.Tencent.dll 13 | D:\Documents\Documents\Visual Studio 2013\Projects\OwinSecruityPrividers\OwinOAuthProviders\Microsoft.Owin.Security.Tencent\obj\Release\Microsoft.Owin.Security.Tencent.pdb 14 | -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.csproj.GenerateResource.Cache -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/Microsoft.Owin.Security.Tencent.pdb -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/TempPE/Resources.Designer.cs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/TempPE/Resources.Designer.cs.dll -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/Microsoft.Owin.Security.Tencent/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /Microsoft.Owin.Security.Tencent/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /OwinOAuthProviders.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OwinOAuthProvidersDemo", "OwinOAuthProvidersDemo\OwinOAuthProvidersDemo.csproj", "{5A438007-0C90-4DAC-BAA1-54A32164067F}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Owin.Security.Sina", "Microsoft.Owin.Security.Sina\Microsoft.Owin.Security.Sina.csproj", "{B96EC058-D0AF-4B2B-8AFF-6300F286F89A}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Owin.Security.Tencent", "Microsoft.Owin.Security.Tencent\Microsoft.Owin.Security.Tencent.csproj", "{745441C6-006A-4DC8-BCC0-64989E0B95C0}" 11 | EndProject 12 | Global 13 | GlobalSection(TeamFoundationVersionControl) = preSolution 14 | SccNumberOfProjects = 4 15 | SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} 16 | SccTeamFoundationServer = https://xiaoyaojian.visualstudio.com/defaultcollection 17 | SccLocalPath0 = . 18 | SccProjectUniqueName1 = OwinOAuthProvidersDemo\\OwinOAuthProvidersDemo.csproj 19 | SccProjectName1 = OwinOAuthProvidersDemo 20 | SccLocalPath1 = OwinOAuthProvidersDemo 21 | SccProjectUniqueName2 = Microsoft.Owin.Security.Sina\\Microsoft.Owin.Security.Sina.csproj 22 | SccProjectName2 = Microsoft.Owin.Security.Sina 23 | SccLocalPath2 = Microsoft.Owin.Security.Sina 24 | SccProjectUniqueName3 = Microsoft.Owin.Security.Tencent\\Microsoft.Owin.Security.Tencent.csproj 25 | SccProjectName3 = Microsoft.Owin.Security.Tencent 26 | SccLocalPath3 = Microsoft.Owin.Security.Tencent 27 | EndGlobalSection 28 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 29 | Debug|Any CPU = Debug|Any CPU 30 | Release|Any CPU = Release|Any CPU 31 | EndGlobalSection 32 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 33 | {5A438007-0C90-4DAC-BAA1-54A32164067F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 34 | {5A438007-0C90-4DAC-BAA1-54A32164067F}.Debug|Any CPU.Build.0 = Debug|Any CPU 35 | {5A438007-0C90-4DAC-BAA1-54A32164067F}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {5A438007-0C90-4DAC-BAA1-54A32164067F}.Release|Any CPU.Build.0 = Release|Any CPU 37 | {B96EC058-D0AF-4B2B-8AFF-6300F286F89A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 38 | {B96EC058-D0AF-4B2B-8AFF-6300F286F89A}.Debug|Any CPU.Build.0 = Debug|Any CPU 39 | {B96EC058-D0AF-4B2B-8AFF-6300F286F89A}.Release|Any CPU.ActiveCfg = Release|Any CPU 40 | {B96EC058-D0AF-4B2B-8AFF-6300F286F89A}.Release|Any CPU.Build.0 = Release|Any CPU 41 | {745441C6-006A-4DC8-BCC0-64989E0B95C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 42 | {745441C6-006A-4DC8-BCC0-64989E0B95C0}.Debug|Any CPU.Build.0 = Debug|Any CPU 43 | {745441C6-006A-4DC8-BCC0-64989E0B95C0}.Release|Any CPU.ActiveCfg = Release|Any CPU 44 | {745441C6-006A-4DC8-BCC0-64989E0B95C0}.Release|Any CPU.Build.0 = Release|Any CPU 45 | EndGlobalSection 46 | GlobalSection(SolutionProperties) = preSolution 47 | HideSolutionNode = FALSE 48 | EndGlobalSection 49 | EndGlobal 50 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace OwinOAuthProvidersDemo 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include( 12 | "~/Scripts/jquery-{version}.js")); 13 | 14 | bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include( 15 | "~/Scripts/jquery.validate*")); 16 | 17 | // Use the development version of Modernizr to develop with and learn from. Then, when you're 18 | // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 19 | bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( 20 | "~/Scripts/modernizr-*")); 21 | 22 | bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( 23 | "~/Scripts/bootstrap.js", 24 | "~/Scripts/respond.js")); 25 | 26 | bundles.Add(new StyleBundle("~/Content/css").Include( 27 | "~/Content/bootstrap.css", 28 | "~/Content/site.css")); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace OwinOAuthProvidersDemo 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace OwinOAuthProvidersDemo 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/App_Start/Startup.Auth.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Security.Claims; 3 | using Microsoft.AspNet.Identity; 4 | using Microsoft.Owin; 5 | using Microsoft.Owin.Security.Cookies; 6 | using Owin; 7 | using Microsoft.Owin.Security.Sina; 8 | using Microsoft.Owin.Security.Tencent; 9 | 10 | namespace OwinOAuthProvidersDemo 11 | { 12 | public partial class Startup 13 | { 14 | // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 15 | public void ConfigureAuth(IAppBuilder app) 16 | { 17 | // Enable the application to use a cookie to store information for the signed in user 18 | app.UseCookieAuthentication(new CookieAuthenticationOptions 19 | { 20 | AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, 21 | LoginPath = new PathString("/Account/Login") 22 | }); 23 | // Use a cookie to temporarily store information about a user logging in with a third party login provider 24 | app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); 25 | //app.UseGoogleAuthentication("", ""); 26 | app.UseSinaAuthentication("", ""); 27 | app.UseTencentAuthentication("", ""); 28 | 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Set width on the form input elements since they're 100% wide by default */ 13 | input, 14 | select, 15 | textarea { 16 | max-width: 280px; 17 | } 18 | 19 | /* styles for validation helpers */ 20 | .field-validation-error { 21 | color: #b94a48; 22 | } 23 | 24 | .field-validation-valid { 25 | display: none; 26 | } 27 | 28 | input.input-validation-error { 29 | border: 1px solid #b94a48; 30 | } 31 | 32 | input[type="checkbox"].input-validation-error { 33 | border: 0 none; 34 | } 35 | 36 | .validation-summary-errors { 37 | color: #b94a48; 38 | } 39 | 40 | .validation-summary-valid { 41 | display: none; 42 | } -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | 7 | namespace OwinOAuthProvidersDemo.Controllers 8 | { 9 | public class HomeController : Controller 10 | { 11 | public ActionResult Index() 12 | { 13 | return View(); 14 | } 15 | 16 | public ActionResult About() 17 | { 18 | ViewBag.Message = "Your application description page."; 19 | 20 | return View(); 21 | } 22 | 23 | public ActionResult Contact() 24 | { 25 | ViewBag.Message = "Your contact page."; 26 | 27 | return View(); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="OwinOAuthProvidersDemo.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | 9 | namespace OwinOAuthProvidersDemo 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 17 | RouteConfig.RegisterRoutes(RouteTable.Routes); 18 | BundleConfig.RegisterBundles(BundleTable.Bundles); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Models/AccountViewModels.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OwinOAuthProvidersDemo.Models 4 | { 5 | public class ExternalLoginConfirmationViewModel 6 | { 7 | [Required] 8 | [Display(Name = "User name")] 9 | public string UserName { get; set; } 10 | } 11 | 12 | public class ManageUserViewModel 13 | { 14 | [Required] 15 | [DataType(DataType.Password)] 16 | [Display(Name = "Current password")] 17 | public string OldPassword { get; set; } 18 | 19 | [Required] 20 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 21 | [DataType(DataType.Password)] 22 | [Display(Name = "New password")] 23 | public string NewPassword { get; set; } 24 | 25 | [DataType(DataType.Password)] 26 | [Display(Name = "Confirm new password")] 27 | [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")] 28 | public string ConfirmPassword { get; set; } 29 | } 30 | 31 | public class LoginViewModel 32 | { 33 | [Required] 34 | [Display(Name = "User name")] 35 | public string UserName { get; set; } 36 | 37 | [Required] 38 | [DataType(DataType.Password)] 39 | [Display(Name = "Password")] 40 | public string Password { get; set; } 41 | 42 | [Display(Name = "Remember me?")] 43 | public bool RememberMe { get; set; } 44 | } 45 | 46 | public class RegisterViewModel 47 | { 48 | [Required] 49 | [Display(Name = "User name")] 50 | public string UserName { get; set; } 51 | 52 | [Required] 53 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 54 | [DataType(DataType.Password)] 55 | [Display(Name = "Password")] 56 | public string Password { get; set; } 57 | 58 | [DataType(DataType.Password)] 59 | [Display(Name = "Confirm password")] 60 | [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] 61 | public string ConfirmPassword { get; set; } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Models/IdentityModels.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNet.Identity.EntityFramework; 2 | 3 | namespace OwinOAuthProvidersDemo.Models 4 | { 5 | // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. 6 | public class ApplicationUser : IdentityUser 7 | { 8 | } 9 | 10 | public class ApplicationDbContext : IdentityDbContext 11 | { 12 | public ApplicationDbContext() 13 | : base("DefaultConnection") 14 | { 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/OwinOAuthProvidersDemo.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | CurrentPage 10 | True 11 | False 12 | False 13 | False 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | False 23 | True 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/OwinOAuthProvidersDemo.csproj.vspscc: -------------------------------------------------------------------------------- 1 | "" 2 | { 3 | "FILE_VERSION" = "9237" 4 | "ENLISTMENT_CHOICE" = "NEVER" 5 | "PROJECT_FILE_RELATIVE_PATH" = "" 6 | "NUMBER_OF_EXCLUDED_FILES" = "0" 7 | "ORIGINAL_PROJECT_FILE_PATH" = "" 8 | "NUMBER_OF_NESTED_PROJECTS" = "0" 9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" 10 | } 11 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("OwinOAuthProvidersDemo")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("OwinOAuthProvidersDemo")] 13 | [assembly: AssemblyCopyright("Copyright © 2013")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("70c17060-534c-47ca-af99-65fe83551d39")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Properties/PublishProfiles/Default Settings (2).pubxml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | MSDeploy 9 | Debug 10 | Any CPU 11 | https://www.markyou.cn/ 12 | True 13 | False 14 | https://54.186.139.42:8172/msdeploy.axd 15 | markyou 16 | 17 | True 18 | WMSVC 19 | True 20 | WIN-VM2QSVFK658\WDeployAdmin 21 | <_SavePWD>True 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | <_ConnectionStringsToInsert Include="OwinOAuthProvidersDemo.Models.ApplicationDbContext" /> 49 | 50 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Properties/PublishProfiles/Default Settings.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | MSDeploy 9 | Release 10 | Any CPU 11 | http://www.markyou.cn/ 12 | True 13 | False 14 | https://54.186.139.42:8172/msdeploy.axd 15 | Default Web Site 16 | 17 | True 18 | WMSVC 19 | True 20 | WIN-VM2QSVFK658\WDeployAdmin 21 | <_SavePWD>False 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | <_ConnectionStringsToInsert Include="OwinOAuthProvidersDemo.Models.ApplicationDbContext" /> 49 | 50 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Scripts/_references.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | /// 5 | /// 6 | /// 7 | /// 8 | /// 9 | /// 10 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Scripts/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl 2 | * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT 3 | * */ 4 | 5 | !function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b@ViewBag.Title. 6 |

Associate your @ViewBag.LoginProvider account.

7 | 8 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | 12 |

Association Form

13 |
14 | @Html.ValidationSummary(true) 15 |

16 | You've successfully authenticated with @ViewBag.LoginProvider. 17 | Please enter a user name for this site below and click the Register button to finish 18 | logging in. 19 |

20 |
21 | @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) 24 | @Html.ValidationMessageFor(m => m.UserName) 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | } 33 | 34 | @section Scripts { 35 | @Scripts.Render("~/bundles/jqueryval") 36 | } 37 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/ExternalLoginFailure.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Login Failure"; 3 | } 4 | 5 |

@ViewBag.Title.

6 |

Unsuccessful login with service.

7 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/Login.cshtml: -------------------------------------------------------------------------------- 1 | @model OwinOAuthProvidersDemo.Models.LoginViewModel 2 | 3 | @{ 4 | ViewBag.Title = "Log in"; 5 | } 6 | 7 |

@ViewBag.Title.

8 |
9 |
10 |
11 | @using (Html.BeginForm("Login", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 12 | { 13 | @Html.AntiForgeryToken() 14 |

Use a local account to log in.

15 |
16 | @Html.ValidationSummary(true) 17 |
18 | @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" }) 19 |
20 | @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) 21 | @Html.ValidationMessageFor(m => m.UserName) 22 |
23 |
24 |
25 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 26 |
27 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 28 | @Html.ValidationMessageFor(m => m.Password) 29 |
30 |
31 |
32 |
33 |
34 | @Html.CheckBoxFor(m => m.RememberMe) 35 | @Html.LabelFor(m => m.RememberMe) 36 |
37 |
38 |
39 |
40 |
41 | 42 |
43 |
44 |

45 | @Html.ActionLink("Register", "Register") if you don't have a local account. 46 |

47 | } 48 |
49 |
50 |
51 |
52 | @Html.Partial("_ExternalLoginsListPartial", new { Action = "ExternalLogin", ReturnUrl = ViewBag.ReturnUrl }) 53 |
54 |
55 |
56 | @section Scripts { 57 | @Scripts.Render("~/bundles/jqueryval") 58 | } -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/Manage.cshtml: -------------------------------------------------------------------------------- 1 | @using OwinOAuthProvidersDemo.Models; 2 | @using Microsoft.AspNet.Identity; 3 | @{ 4 | ViewBag.Title = "Manage Account"; 5 | } 6 | 7 |

@ViewBag.Title.

8 | 9 |

@ViewBag.StatusMessage

10 |
11 |
12 | @if (ViewBag.HasLocalPassword) 13 | { 14 | @Html.Partial("_ChangePasswordPartial") 15 | } 16 | else 17 | { 18 | @Html.Partial("_SetPasswordPartial") 19 | } 20 | 21 |
22 | @Html.Action("RemoveAccountList") 23 | @Html.Partial("_ExternalLoginsListPartial", new { Action = "LinkLogin", ReturnUrl = ViewBag.ReturnUrl }) 24 |
25 |
26 |
27 | @section Scripts { 28 | @Scripts.Render("~/bundles/jqueryval") 29 | } 30 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/Register.cshtml: -------------------------------------------------------------------------------- 1 | @model OwinOAuthProvidersDemo.Models.RegisterViewModel 2 | @{ 3 | ViewBag.Title = "Register"; 4 | } 5 | 6 |

@ViewBag.Title.

7 | 8 | @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 |

Create a new account.

12 |
13 | @Html.ValidationSummary() 14 |
15 | @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" }) 16 |
17 | @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" }) 18 |
19 |
20 |
21 | @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" }) 22 |
23 | @Html.PasswordFor(m => m.Password, new { @class = "form-control" }) 24 |
25 |
26 |
27 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 28 |
29 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 30 |
31 |
32 |
33 |
34 | 35 |
36 |
37 | } 38 | 39 | @section Scripts { 40 | @Scripts.Render("~/bundles/jqueryval") 41 | } 42 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/_ChangePasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @model OwinOAuthProvidersDemo.Models.ManageUserViewModel 3 | 4 |

You're logged in as @User.Identity.GetUserName().

5 | 6 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 7 | { 8 | @Html.AntiForgeryToken() 9 |

Change Password Form

10 |
11 | @Html.ValidationSummary() 12 |
13 | @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) 14 |
15 | @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) 16 |
17 |
18 |
19 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 20 |
21 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 22 |
23 |
24 |
25 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 26 |
27 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 28 |
29 |
30 | 31 |
32 |
33 | 34 |
35 |
36 | } 37 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/_ExternalLoginsListPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.Owin.Security 2 | 3 |

Use another service to log in.

4 |
5 | @{ 6 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes(); 7 | if (loginProviders.Count() == 0) 8 | { 9 |
10 |

11 | There are no external authentication services configured. See this article 12 | for details on setting up this ASP.NET application to support logging in via external services. 13 |

14 |
15 | } 16 | else 17 | { 18 | string action = Model.Action; 19 | string returnUrl = Model.ReturnUrl; 20 | using (Html.BeginForm(action, "Account", new { ReturnUrl = returnUrl })) 21 | { 22 | @Html.AntiForgeryToken() 23 |
24 |

25 | @foreach (AuthenticationDescription p in loginProviders) 26 | { 27 | 28 | } 29 |

30 |
31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/_RemoveAccountPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model ICollection 2 | 3 | @if (Model.Count > 0) 4 | { 5 |

Registered Logins

6 | 7 | 8 | @foreach (var account in Model) 9 | { 10 | 11 | 12 | 30 | 31 | } 32 | 33 |
@account.LoginProvider 13 | @if (ViewBag.ShowRemoveButton) 14 | { 15 | using (Html.BeginForm("Disassociate", "Account")) 16 | { 17 | @Html.AntiForgeryToken() 18 |
19 | @Html.Hidden("loginProvider", account.LoginProvider) 20 | @Html.Hidden("providerKey", account.ProviderKey) 21 | 22 |
23 | } 24 | } 25 | else 26 | { 27 | @:   28 | } 29 |
34 | } 35 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Account/_SetPasswordPartial.cshtml: -------------------------------------------------------------------------------- 1 | @model OwinOAuthProvidersDemo.Models.ManageUserViewModel 2 | 3 |

4 | You do not have a local username/password for this site. Add a local 5 | account so you can log in without an external login. 6 |

7 | 8 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 9 | { 10 | @Html.AntiForgeryToken() 11 | 12 |

Create Local Login

13 |
14 | @Html.ValidationSummary() 15 |
16 | @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) 17 |
18 | @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) 19 |
20 |
21 |
22 | @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) 23 |
24 | @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | } 33 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "About"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Contact"; 3 | } 4 |

@ViewBag.Title.

5 |

@ViewBag.Message

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
-------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewBag.Title = "Home Page"; 3 | } 4 | 5 |
6 |

ASP.NET

7 |

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

8 |

Learn more »

9 |
10 | 11 |
12 |
13 |

Getting started

14 |

15 | ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that 16 | enables a clean separation of concerns and gives you full control over markup 17 | for enjoyable, agile development. 18 |

19 |

Learn more »

20 |
21 |
22 |

Get more libraries

23 |

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

24 |

Learn more »

25 |
26 |
27 |

Web Hosting

28 |

You can easily find a web hosting company that offers the right mix of features and price for your applications.

29 |

Learn more »

30 |
31 |
-------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model System.Web.Mvc.HandleErrorInfo 2 | 3 | @{ 4 | ViewBag.Title = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | @ViewBag.Title - My ASP.NET Application 8 | @Styles.Render("~/Content/css") 9 | @Scripts.Render("~/bundles/modernizr") 10 | 11 | 12 | 13 | 33 |
34 | @RenderBody() 35 |
36 |
37 |

© @DateTime.Now.Year - My ASP.NET Application

38 |
39 |
40 | 41 | @Scripts.Render("~/bundles/jquery") 42 | @Scripts.Render("~/bundles/bootstrap") 43 | @RenderSection("scripts", required: false) 44 | 45 | 46 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNet.Identity 2 | @if (Request.IsAuthenticated) 3 | { 4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) 5 | { 6 | @Html.AntiForgeryToken() 7 | 8 | 14 | } 15 | } 16 | else 17 | { 18 | 22 | } 23 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Web.Debug.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Web.Release.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Antlr3.Runtime.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Antlr3.Runtime.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Antlr3.Runtime.pdb -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/EntityFramework.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Facebook.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Facebook.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Google.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Google.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.MicrosoftAccount.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.MicrosoftAccount.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Sina.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Sina.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Sina.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Sina.pdb -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Tencent.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Tencent.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Tencent.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Tencent.pdb -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Twitter.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.Twitter.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Owin.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/Owin.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/OwinOAuthProvidersDemo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/OwinOAuthProvidersDemo.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/OwinOAuthProvidersDemo.dll.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/OwinOAuthProvidersDemo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/OwinOAuthProvidersDemo.pdb -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/System.Web.Helpers.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/System.Web.Mvc.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/System.Web.Optimization.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/System.Web.Razor.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/System.Web.WebPages.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/bin/WebGrease.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/bin/WebGrease.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/favicon.ico -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Debug/OwinOAuthProvidersDemo.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Debug/OwinOAuthProvidersDemo.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Debug/OwinOAuthProvidersDemo.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Debug/OwinOAuthProvidersDemo.dll -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Debug/OwinOAuthProvidersDemo.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Debug/OwinOAuthProvidersDemo.pdb -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/obj/Release/build.force: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/OwinOAuthProvidersDemo/obj/Release/build.force -------------------------------------------------------------------------------- /OwinOAuthProvidersDemo/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #Sina and Tencent open authentication provider of OWIN# 2 | ##Installation## 3 | Use following command to install each package in your project 4 | `Install-Package Microsoft.Owin.Security.Sina` and 5 | `Install-Package Microsoft.Owin.Security.Tencent` 6 | ##Getting Started## 7 | Before you use these package,i assume you already created your own application in [connect.qq.com](http://connect.qq.com/ "Open QQ") or [open.weibo.com](https://open.weibo.com/ "Open Weibo"). 8 | 9 | 1. Create an asp.net 5 web application ,and select 'MVC' template.do not change authentication setting. 10 | 2. Install these providers 11 | 3. Open `Startup.Auth.cs` file,add following namespaces 12 | 1. `Microsoft.Owin.Security.Sina` 13 | 2. `Microsoft.Owin.Security.Tencent` 14 | 4. add following code section with your 'appId' and 'secretId'. 15 | 1. `app.UseSinaAuthentication("YOUR APP ID", "YOUR SECRET ID");` 16 | 2. `app.UseTencentAuthentication("YOUR APP ID", "YOUR SECRET ID");` 17 | 5. Try to run your application with the domain address you designated in management center of each open platform 18 | -------------------------------------------------------------------------------- /packages/Antlr.3.5.0.2/Antlr.3.5.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Antlr.3.5.0.2/Antlr.3.5.0.2.nupkg -------------------------------------------------------------------------------- /packages/Antlr.3.5.0.2/lib/Antlr3.Runtime.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Antlr.3.5.0.2/lib/Antlr3.Runtime.dll -------------------------------------------------------------------------------- /packages/Antlr.3.5.0.2/lib/Antlr3.Runtime.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Antlr.3.5.0.2/lib/Antlr3.Runtime.pdb -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/EntityFramework.6.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/EntityFramework.6.1.1.nupkg -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/content/App.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/content/Web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net40/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/lib/net40/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net40/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/lib/net40/EntityFramework.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net45/EntityFramework.SqlServer.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/lib/net45/EntityFramework.SqlServer.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/lib/net45/EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/lib/net45/EntityFramework.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.Utility.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.Utility.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/tools/EntityFramework.PowerShell.dll -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/EntityFramework.psd1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/tools/EntityFramework.psd1 -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/about_EntityFramework.help.txt: -------------------------------------------------------------------------------- 1 | TOPIC 2 | about_EntityFramework 3 | 4 | SHORT DESCRIPTION 5 | Provides information about Entity Framework commands. 6 | 7 | LONG DESCRIPTION 8 | This topic describes the Entity Framework commands. Entity Framework is 9 | Microsoft's recommended data access technology for new applications. 10 | 11 | The following Entity Framework cmdlets are used with Entity Framework 12 | Migrations. 13 | 14 | Cmdlet Description 15 | ----------------- --------------------------------------------------- 16 | Enable-Migrations Enables Code First Migrations in a project. 17 | 18 | Add-Migration Scaffolds a migration script for any pending model 19 | changes. 20 | 21 | Update-Database Applies any pending migrations to the database. 22 | 23 | Get-Migrations Displays the migrations that have been applied to 24 | the target database. 25 | 26 | The following Entity Framework cmdlets are used by NuGet packages that 27 | install Entity Framework providers. These commands are not usually used as 28 | part of normal application development. 29 | 30 | Cmdlet Description 31 | ------------------------------ --------------------------------------- 32 | Add-EFProvider Adds or updates an Entity Framework 33 | provider entry in the project config 34 | file. 35 | 36 | Add-EFDefaultConnectionFactory Adds or updates an Entity Framework 37 | default connection factory in the 38 | project config file. 39 | 40 | Initialize-EFConfiguration Initializes the Entity Framework 41 | section in the project config file and 42 | sets defaults. 43 | 44 | SEE ALSO 45 | Enable-Migrations 46 | Add-Migration 47 | Update-Database 48 | Get-Migrations 49 | -------------------------------------------------------------------------------- /packages/EntityFramework.6.1.1/tools/migrate.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/EntityFramework.6.1.1/tools/migrate.exe -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Identity.Core.2.2.1/Microsoft.AspNet.Identity.Core.2.2.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/Microsoft.AspNet.Identity.EntityFramework.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/Microsoft.AspNet.Identity.EntityFramework.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Identity.EntityFramework.2.1.0/lib/net45/Microsoft.AspNet.Identity.EntityFramework.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Identity.Owin.2.2.1/Microsoft.AspNet.Identity.Owin.2.2.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Mvc.5.2.0/Microsoft.AspNet.Mvc.5.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Mvc.5.2.0/lib/net45/System.Web.Mvc.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Razor.3.2.0/Microsoft.AspNet.Razor.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Razor.3.2.0/lib/net45/System.Web.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Web.Optimization.1.1.3/Microsoft.AspNet.Web.Optimization.1.1.3.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.Web.Optimization.1.1.3/lib/net40/System.Web.Optimization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.Web.Optimization.1.1.3/lib/net40/System.Web.Optimization.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Content/Web.config.install.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Content/Web.config.uninstall.xdt: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 7 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.WebPages.3.2.0/Microsoft.AspNet.WebPages.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.Helpers.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Deployment.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.Razor.dll -------------------------------------------------------------------------------- /packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.AspNet.WebPages.3.2.0/lib/net45/System.Web.WebPages.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.2.1.0/Microsoft.Owin.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.2.1.0/Microsoft.Owin.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.2.1.0/lib/net40/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.2.1.0/lib/net40/Microsoft.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.2.1.0/lib/net45/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.2.1.0/lib/net45/Microsoft.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.3.0.1/Microsoft.Owin.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.3.0.1/Microsoft.Owin.3.0.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.3.0.1/lib/net45/Microsoft.Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.3.0.1/lib/net45/Microsoft.Owin.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Host.SystemWeb.3.0.1/Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Host.SystemWeb.3.0.1/Microsoft.Owin.Host.SystemWeb.3.0.1.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Host.SystemWeb.3.0.1/lib/net45/Microsoft.Owin.Host.SystemWeb.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Host.SystemWeb.3.0.1/lib/net45/Microsoft.Owin.Host.SystemWeb.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Security.2.1.0/Microsoft.Owin.Security.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Security.2.1.0/lib/net45/Microsoft.Owin.Security.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Security.Cookies.2.1.0/Microsoft.Owin.Security.Cookies.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Security.Cookies.2.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Security.OAuth.2.1.0/Microsoft.Owin.Security.OAuth.2.1.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Owin.Security.OAuth.2.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Owin.Security.OAuth.2.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Web.Infrastructure.1.0.0.0/Microsoft.Web.Infrastructure.1.0.0.0.nupkg -------------------------------------------------------------------------------- /packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll -------------------------------------------------------------------------------- /packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.0/Microsoft.jQuery.Unobtrusive.Validation.3.2.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Microsoft.jQuery.Unobtrusive.Validation.3.2.0/Microsoft.jQuery.Unobtrusive.Validation.3.2.0.nupkg -------------------------------------------------------------------------------- /packages/Modernizr.2.7.2/Modernizr.2.7.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Modernizr.2.7.2/Modernizr.2.7.2.nupkg -------------------------------------------------------------------------------- /packages/Modernizr.2.7.2/Tools/common.ps1: -------------------------------------------------------------------------------- 1 | function AddOrUpdate-Reference($scriptsFolderProjectItem, $fileNamePattern, $newFileName) { 2 | try { 3 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 4 | } 5 | catch { 6 | # _references.js file not found 7 | return 8 | } 9 | 10 | if ($referencesFileProjectItem -eq $null) { 11 | # _references.js file not found 12 | return 13 | } 14 | 15 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 16 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 17 | 18 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 0) { 19 | # File has no existing matching reference line 20 | # Add the full reference line to the beginning of the file 21 | "/// " | Add-Content $referencesTempFilePath -Encoding UTF8 22 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 23 | } 24 | else { 25 | # Loop through file and replace old file name with new file name 26 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 27 | } 28 | 29 | # Copy over the new _references.js file 30 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 31 | Remove-Item $referencesTempFilePath -Force 32 | } 33 | 34 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 35 | try { 36 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 37 | } 38 | catch { 39 | # _references.js file not found 40 | return 41 | } 42 | 43 | if ($referencesFileProjectItem -eq $null) { 44 | return 45 | } 46 | 47 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 48 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 49 | 50 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 51 | # Delete the line referencing the file 52 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 53 | 54 | # Copy over the new _references.js file 55 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 56 | Remove-Item $referencesTempFilePath -Force 57 | } 58 | } 59 | 60 | # Extract the version number from the file in the package's content\scripts folder 61 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 62 | $modernizrFileName = Join-Path $packageScriptsFolder "modernizr-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 63 | $modernizrFileNameRegEx = "modernizr-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 64 | $modernizrFileName -match $modernizrFileNameRegEx 65 | $ver = $matches[1] 66 | 67 | # Get the project item for the scripts folder 68 | try { 69 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 70 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 71 | } 72 | catch { 73 | # No Scripts folder 74 | Write-Host "No scripts folder found" 75 | } -------------------------------------------------------------------------------- /packages/Modernizr.2.7.2/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | if ($scriptsFolderProjectItem -eq $null) { 6 | # No Scripts folder 7 | Write-Host "No Scripts folder found" 8 | exit 9 | } 10 | 11 | # Update the _references.js file 12 | AddOrUpdate-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx $modernizrFileName -------------------------------------------------------------------------------- /packages/Modernizr.2.7.2/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Update the _references.js file 6 | Remove-Reference $scriptsFolderProjectItem $modernizrFileNameRegEx -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/Newtonsoft.Json.6.0.4.nupkg -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/lib/netcore45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.4/lib/portable-net45+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.4/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # open json.net splash page on package install 4 | # don't open if json.net is installed as a dependency 5 | 6 | try 7 | { 8 | $url = "http://james.newtonking.com/json" 9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) 10 | 11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") 12 | { 13 | # user is installing from VS NuGet console 14 | # get reference to the window, the console host and the input history 15 | # show webpage if "install-package newtonsoft.json" was last input 16 | 17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) 18 | 19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` 20 | [System.Reflection.BindingFlags]::NonPublic) 21 | 22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 23 | if ($prop -eq $null) { return } 24 | 25 | $hostInfo = $prop.GetValue($consoleWindow) 26 | if ($hostInfo -eq $null) { return } 27 | 28 | $history = $hostInfo.WpfConsole.InputHistory.History 29 | 30 | $lastCommand = $history | select -last 1 31 | 32 | if ($lastCommand) 33 | { 34 | $lastCommand = $lastCommand.Trim().ToLower() 35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) 36 | { 37 | $dte2.ItemOperations.Navigate($url) | Out-Null 38 | } 39 | } 40 | } 41 | else 42 | { 43 | # user is installing from VS NuGet dialog 44 | # get reference to the window, then smart output console provider 45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation 46 | 47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` 48 | [System.Reflection.BindingFlags]::NonPublic) 49 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` 50 | [System.Reflection.BindingFlags]::NonPublic) 51 | if ($instanceField -eq $null -or $consoleField -eq $null) { return } 52 | 53 | $instance = $instanceField.GetValue($null) 54 | if ($instance -eq $null) { return } 55 | 56 | $consoleProvider = $consoleField.GetValue($instance) 57 | if ($consoleProvider -eq $null) { return } 58 | 59 | $console = $consoleProvider.CreateOutputConsole($false) 60 | 61 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` 62 | [System.Reflection.BindingFlags]::NonPublic) 63 | if ($messagesField -eq $null) { return } 64 | 65 | $messages = $messagesField.GetValue($console) 66 | if ($messages -eq $null) { return } 67 | 68 | $operations = $messages -split "==============================" 69 | 70 | $lastOperation = $operations | select -last 1 71 | 72 | if ($lastOperation) 73 | { 74 | $lastOperation = $lastOperation.ToLower() 75 | 76 | $lines = $lastOperation -split "`r`n" 77 | 78 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 79 | 80 | if ($installMatch) 81 | { 82 | $dte2.ItemOperations.Navigate($url) | Out-Null 83 | } 84 | } 85 | } 86 | } 87 | catch 88 | { 89 | # stop potential errors from bubbling up 90 | # worst case the splash page won't open 91 | } 92 | 93 | # yolo -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/Newtonsoft.Json.6.0.8.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/Newtonsoft.Json.6.0.8.nupkg -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/lib/netcore45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/lib/netcore45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/lib/portable-net45+wp80+win8+wpa81+aspnetcore50/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Newtonsoft.Json.6.0.8/lib/portable-net45+wp80+win8+wpa81+aspnetcore50/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /packages/Newtonsoft.Json.6.0.8/tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | # open json.net splash page on package install 4 | # don't open if json.net is installed as a dependency 5 | 6 | try 7 | { 8 | $url = "http://james.newtonking.com/json/install?version=" + $package.Version 9 | $dte2 = Get-Interface $dte ([EnvDTE80.DTE2]) 10 | 11 | if ($dte2.ActiveWindow.Caption -eq "Package Manager Console") 12 | { 13 | # user is installing from VS NuGet console 14 | # get reference to the window, the console host and the input history 15 | # show webpage if "install-package newtonsoft.json" was last input 16 | 17 | $consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow]) 18 | 19 | $props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor ` 20 | [System.Reflection.BindingFlags]::NonPublic) 21 | 22 | $prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1 23 | if ($prop -eq $null) { return } 24 | 25 | $hostInfo = $prop.GetValue($consoleWindow) 26 | if ($hostInfo -eq $null) { return } 27 | 28 | $history = $hostInfo.WpfConsole.InputHistory.History 29 | 30 | $lastCommand = $history | select -last 1 31 | 32 | if ($lastCommand) 33 | { 34 | $lastCommand = $lastCommand.Trim().ToLower() 35 | if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json")) 36 | { 37 | $dte2.ItemOperations.Navigate($url) | Out-Null 38 | } 39 | } 40 | } 41 | else 42 | { 43 | # user is installing from VS NuGet dialog 44 | # get reference to the window, then smart output console provider 45 | # show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation 46 | 47 | $instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor ` 48 | [System.Reflection.BindingFlags]::NonPublic) 49 | 50 | $consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor ` 51 | [System.Reflection.BindingFlags]::NonPublic) 52 | 53 | if ($instanceField -eq $null -or $consoleField -eq $null) { return } 54 | 55 | $instance = $instanceField.GetValue($null) 56 | 57 | if ($instance -eq $null) { return } 58 | 59 | $consoleProvider = $consoleField.GetValue($instance) 60 | if ($consoleProvider -eq $null) { return } 61 | 62 | $console = $consoleProvider.CreateOutputConsole($false) 63 | 64 | $messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor ` 65 | [System.Reflection.BindingFlags]::NonPublic) 66 | if ($messagesField -eq $null) { return } 67 | 68 | $messages = $messagesField.GetValue($console) 69 | if ($messages -eq $null) { return } 70 | 71 | $operations = $messages -split "==============================" 72 | 73 | $lastOperation = $operations | select -last 1 74 | 75 | if ($lastOperation) 76 | { 77 | $lastOperation = $lastOperation.ToLower() 78 | 79 | $lines = $lastOperation -split "`r`n" 80 | 81 | $installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1 82 | 83 | if ($installMatch) 84 | { 85 | $dte2.ItemOperations.Navigate($url) | Out-Null 86 | } 87 | } 88 | } 89 | } 90 | catch 91 | { 92 | try 93 | { 94 | $pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager") 95 | 96 | $selection = $pmPane.TextDocument.Selection 97 | $selection.StartOfDocument($false) 98 | $selection.EndOfDocument($true) 99 | 100 | if ($selection.Text.StartsWith("Installing 'Newtonsoft.Json ")) 101 | { 102 | $dte2.ItemOperations.Navigate($url) | Out-Null 103 | } 104 | } 105 | catch 106 | { 107 | # stop potential errors from bubbling up 108 | # worst case the splash page won't open 109 | } 110 | } 111 | 112 | # still yolo -------------------------------------------------------------------------------- /packages/Owin.1.0/Owin.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Owin.1.0/Owin.1.0.nupkg -------------------------------------------------------------------------------- /packages/Owin.1.0/lib/net40/Owin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Owin.1.0/lib/net40/Owin.dll -------------------------------------------------------------------------------- /packages/Respond.1.4.2/Respond.1.4.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/Respond.1.4.2/Respond.1.4.2.nupkg -------------------------------------------------------------------------------- /packages/Respond.1.4.2/content/Scripts/respond.min.js: -------------------------------------------------------------------------------- 1 | /*! Respond.js v1.4.2: min/max-width media query polyfill * Copyright 2013 Scott Jehl 2 | * Licensed under https://github.com/scottjehl/Respond/blob/master/LICENSE-MIT 3 | * */ 4 | 5 | !function(a){"use strict";a.matchMedia=a.matchMedia||function(a){var b,c=a.documentElement,d=c.firstElementChild||c.firstChild,e=a.createElement("body"),f=a.createElement("div");return f.id="mq-test-1",f.style.cssText="position:absolute;top:-100em",e.style.background="none",e.appendChild(f),function(a){return f.innerHTML='­',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){u(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))};if(c.ajax=f,c.queue=d,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\([\s]*min\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/,maxw:/\([\s]*max\-width\s*:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var g,h,i,j=a.document,k=j.documentElement,l=[],m=[],n=[],o={},p=30,q=j.getElementsByTagName("head")[0]||k,r=j.getElementsByTagName("base")[0],s=q.getElementsByTagName("link"),t=function(){var a,b=j.createElement("div"),c=j.body,d=k.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=j.createElement("body"),c.style.background="none"),k.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&k.insertBefore(c,k.firstChild),a=b.offsetWidth,f?k.removeChild(c):c.removeChild(b),k.style.fontSize=d,e&&(c.style.fontSize=e),a=i=parseFloat(a)},u=function(b){var c="clientWidth",d=k[c],e="CSS1Compat"===j.compatMode&&d||j.body[c]||d,f={},o=s[s.length-1],r=(new Date).getTime();if(b&&g&&p>r-g)return a.clearTimeout(h),h=a.setTimeout(u,p),void 0;g=r;for(var v in l)if(l.hasOwnProperty(v)){var w=l[v],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?i||t():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?i||t():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(m[w.rules]))}for(var C in n)n.hasOwnProperty(C)&&n[C]&&n[C].parentNode===q&&q.removeChild(n[C]);n.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=j.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,q.insertBefore(E,o.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(j.createTextNode(F)),n.push(E)}},v=function(a,b,d){var e=a.replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var g=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},h=!f&&d;b.length&&(b+="/"),h&&(f=1);for(var i=0;f>i;i++){var j,k,n,o;h?(j=d,m.push(g(a))):(j=e[i].match(c.regex.findStyles)&&RegExp.$1,m.push(RegExp.$2&&g(RegExp.$2))),n=j.split(","),o=n.length;for(var p=0;o>p;p++)k=n[p],l.push({media:k.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:m.length-1,hasquery:k.indexOf("(")>-1,minw:k.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:k.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}u()},w=function(){if(d.length){var b=d.shift();f(b.href,function(c){v(c,b.href,b.media),o[b.href]=!0,a.setTimeout(function(){w()},0)})}},x=function(){for(var b=0;b" | Add-Content $referencesTempFilePath -Encoding UTF8 44 | Get-Content $referencesFilePath | Add-Content $referencesTempFilePath 45 | } 46 | else { 47 | # Loop through file and replace old file name with new file name 48 | Get-Content $referencesFilePath | ForEach-Object { $_ -replace $fileNamePattern, $newFileName } > $referencesTempFilePath 49 | } 50 | 51 | # Copy over the new _references.js file 52 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 53 | Remove-Item $referencesTempFilePath -Force 54 | } 55 | 56 | function Remove-Reference($scriptsFolderProjectItem, $fileNamePattern) { 57 | try { 58 | $referencesFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("_references.js") 59 | } 60 | catch { 61 | # _references.js file not found 62 | return 63 | } 64 | 65 | if ($referencesFileProjectItem -eq $null) { 66 | return 67 | } 68 | 69 | $referencesFilePath = $referencesFileProjectItem.FileNames(1) 70 | $referencesTempFilePath = Join-Path $env:TEMP "_references.tmp.js" 71 | 72 | if ((Select-String $referencesFilePath -pattern $fileNamePattern).Length -eq 1) { 73 | # Delete the line referencing the file 74 | Get-Content $referencesFilePath | ForEach-Object { if (-not ($_ -match $fileNamePattern)) { $_ } } > $referencesTempFilePath 75 | 76 | # Copy over the new _references.js file 77 | Copy-Item $referencesTempFilePath $referencesFilePath -Force 78 | Remove-Item $referencesTempFilePath -Force 79 | } 80 | } 81 | 82 | function Delete-ProjectItem($item) { 83 | $itemDeleted = $false 84 | for ($1=1; $i -le 5; $i++) { 85 | try { 86 | $item.Delete() 87 | $itemDeleted = $true 88 | break 89 | } 90 | catch { 91 | # Try again in 200ms 92 | [System.Threading.Thread]::Sleep(200) 93 | } 94 | } 95 | if ($itemDeleted -eq $false) { 96 | throw "Unable to delete project item after five attempts." 97 | } 98 | } 99 | 100 | # Extract the version number from the jquery file in the package's content\scripts folder 101 | $packageScriptsFolder = Join-Path $installPath Content\Scripts 102 | $jqueryFileName = Join-Path $packageScriptsFolder "jquery-*.js" | Get-ChildItem -Exclude "*.min.js","*-vsdoc.js" | Split-Path -Leaf 103 | $jqueryFileNameRegEx = "jquery-((?:\d+\.)?(?:\d+\.)?(?:\d+\.)?(?:\d+)).js" 104 | $jqueryFileName -match $jqueryFileNameRegEx 105 | $ver = $matches[1] 106 | 107 | $intelliSenseFileName = "jquery-$ver.intellisense.js" 108 | 109 | # Get the project item for the scripts folder 110 | try { 111 | $scriptsFolderProjectItem = $project.ProjectItems.Item("Scripts") 112 | $projectScriptsFolderPath = $scriptsFolderProjectItem.FileNames(1) 113 | } 114 | catch { 115 | # No Scripts folder 116 | Write-Host "No scripts folder found" 117 | } -------------------------------------------------------------------------------- /packages/jQuery.2.1.1/Tools/install.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # VS 11 and above supports the new intellisense JS files 6 | $vsVersion = [System.Version]::Parse($dte.Version) 7 | $supportsJsIntelliSenseFile = $vsVersion.Major -ge 11 8 | 9 | if (-not $supportsJsIntelliSenseFile) { 10 | $displayVersion = $vsVersion.Major 11 | Write-Host "IntelliSense JS files are not supported by your version of Visual Studio: $displayVersion" 12 | exit 13 | } 14 | 15 | if ($scriptsFolderProjectItem -eq $null) { 16 | # No Scripts folder 17 | Write-Host "No Scripts folder found" 18 | exit 19 | } 20 | 21 | # Delete the vsdoc file from the project 22 | try { 23 | $vsDocProjectItem = $scriptsFolderProjectItem.ProjectItems.Item("jquery-$ver-vsdoc.js") 24 | Delete-ProjectItem $vsDocProjectItem 25 | } 26 | catch { 27 | Write-Host "Error deleting vsdoc file: " + $_.Exception -ForegroundColor Red 28 | exit 29 | } 30 | 31 | # Copy the intellisense file to the project from the tools folder 32 | $intelliSenseFileSourcePath = Join-Path $toolsPath $intelliSenseFileName 33 | try { 34 | $scriptsFolderProjectItem.ProjectItems.AddFromFileCopy($intelliSenseFileSourcePath) 35 | } 36 | catch { 37 | # This will throw if the file already exists, so we need to catch here 38 | } 39 | 40 | # Update the _references.js file 41 | AddOrUpdate-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx $jqueryFileName -------------------------------------------------------------------------------- /packages/jQuery.2.1.1/Tools/uninstall.ps1: -------------------------------------------------------------------------------- 1 | param($installPath, $toolsPath, $package, $project) 2 | 3 | . (Join-Path $toolsPath common.ps1) 4 | 5 | # Determine the file paths 6 | $projectIntelliSenseFilePath = Join-Path $projectScriptsFolderPath $intelliSenseFileName 7 | $origIntelliSenseFilePath = Join-Path $toolsPath $intelliSenseFileName 8 | 9 | if (Test-Path $projectIntelliSenseFilePath) { 10 | if ((Get-Checksum $projectIntelliSenseFilePath) -eq (Get-Checksum $origIntelliSenseFilePath)) { 11 | # The intellisense file in the project matches the file in the tools folder, delete it 12 | 13 | if ($scriptsFolderProjectItem -eq $null) { 14 | # No Scripts folder 15 | exit 16 | } 17 | 18 | try { 19 | # Get the project item for the intellisense file 20 | $intelliSenseFileProjectItem = $scriptsFolderProjectItem.ProjectItems.Item($intelliSenseFileName) 21 | } 22 | catch { 23 | # The item wasn't found 24 | exit 25 | } 26 | 27 | # Delete the project item 28 | Delete-ProjectItem $intelliSenseFileProjectItem 29 | } 30 | else { 31 | $projectScriptsFolderLeaf = Split-Path $projectScriptsFolderPath -Leaf 32 | Write-Host "Skipping '$projectScriptsFolderLeaf\$intelliSenseFileName' because it was modified." -ForegroundColor Magenta 33 | } 34 | } 35 | else { 36 | # The intellisense file was not found in project 37 | Write-Host "The intellisense file was not found in project at path $projectIntelliSenseFilePath" 38 | } 39 | 40 | # Update the _references.js file 41 | Remove-Reference $scriptsFolderProjectItem $jqueryFileNameRegEx -------------------------------------------------------------------------------- /packages/jQuery.2.1.1/jQuery.2.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/jQuery.2.1.1/jQuery.2.1.1.nupkg -------------------------------------------------------------------------------- /packages/jQuery.Validation.1.13.0/jQuery.Validation.1.13.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xiaoyaojian/OwinOAuthProvider/ae978917436f90f284d283b48cbd1513cb2a5a47/packages/jQuery.Validation.1.13.0/jQuery.Validation.1.13.0.nupkg --------------------------------------------------------------------------------