diff --git a/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenidConnectAuthenticationHandler.cs b/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenidConnectAuthenticationHandler.cs index 67711ac5ef..884dfa733f 100644 --- a/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenidConnectAuthenticationHandler.cs +++ b/src/Microsoft.AspNet.Authentication.OpenIdConnect/OpenidConnectAuthenticationHandler.cs @@ -220,7 +220,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect } OpenIdConnectMessage openIdConnectMessage = null; - + // assumption: if the ContentType is "application/x-www-form-urlencoded" it should be safe to read as it is small. if (string.Equals(Request.Method, "POST", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(Request.ContentType) @@ -566,7 +566,7 @@ namespace Microsoft.AspNet.Authentication.OpenIdConnect { if (ticket.Principal != null) { - Request.HttpContext.Response.SignIn(ticket.AuthenticationScheme, ticket.Principal, ticket.Properties); + Request.HttpContext.Response.SignIn(Options.SignInScheme, ticket.Principal, ticket.Properties); } // Redirect back to the original secured resource, if any. diff --git a/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectMiddlewareTests.cs b/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectMiddlewareTests.cs index 725c2a0735..96f17c86ea 100644 --- a/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectMiddlewareTests.cs +++ b/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectMiddlewareTests.cs @@ -13,13 +13,13 @@ using System.Text; using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; +using Microsoft.AspNet.Authentication.Cookies; +using Microsoft.AspNet.Authentication.DataHandler; +using Microsoft.AspNet.Authentication.OpenIdConnect; using Microsoft.AspNet.Builder; using Microsoft.AspNet.DataProtection; using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Authentication; -using Microsoft.AspNet.Authentication.Cookies; -using Microsoft.AspNet.Authentication.DataHandler; -using Microsoft.AspNet.Authentication.OpenIdConnect; using Microsoft.AspNet.TestHost; using Microsoft.Framework.DependencyInjection; using Newtonsoft.Json;