diff --git a/Identity.sln b/Identity.sln index 76dc94da9d..7eb7cf434f 100644 --- a/Identity.sln +++ b/Identity.sln @@ -27,6 +27,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{58D9 EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "IdentitySample.Mvc", "samples\IdentitySample.Mvc\IdentitySample.Mvc.kproj", "{E1BFA023-CFFD-49CE-8466-1C28DD2EC1F6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{970CAB07-F853-4712-AA12-BD8961C8E430}" + ProjectSection(SolutionItems) = preProject + global.json = global.json + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs b/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs index 0778c89f7e..d45d250f66 100644 --- a/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs +++ b/src/Microsoft.AspNet.Identity.Authentication/HttpAuthenticationManager.cs @@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Identity.Authentication public void SignIn(ClaimsIdentity identity, bool isPersistent) { - Context.Response.SignIn(identity, new AuthenticationProperties { IsPersistent = isPersistent }); + Context.Response.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity); } public void SignOut(string authenticationType) { diff --git a/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs b/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs index 388382ac28..73e3c8e98f 100644 --- a/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs +++ b/test/Microsoft.AspNet.Identity.Authentication.Test/HttpSignInTest.cs @@ -144,7 +144,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test var context = new Mock(); var response = new Mock(); context.Setup(c => c.Response).Returns(response.Object).Verifiable(); - response.Setup(r => r.SignIn(It.IsAny(), It.Is(v => v.IsPersistent == isPersistent))).Verifiable(); + response.Setup(r => r.SignIn(It.Is(v => v.IsPersistent == isPersistent), It.IsAny())).Verifiable(); var contextAccessor = new Mock>(); contextAccessor.Setup(a => a.Value).Returns(context.Object); var roleManager = MockHelpers.MockRoleManager(); @@ -176,7 +176,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test manager.Setup(m => m.CheckPasswordAsync(user, "password", CancellationToken.None)).ReturnsAsync(true).Verifiable(); var context = new Mock(); var response = new Mock(); - response.Setup(r => r.SignIn(It.IsAny(), It.IsAny())).Verifiable(); + response.Setup(r => r.SignIn(It.IsAny(), It.IsAny())).Verifiable(); context.Setup(c => c.Response).Returns(response.Object).Verifiable(); var contextAccessor = new Mock>(); contextAccessor.Setup(a => a.Value).Returns(context.Object); @@ -245,7 +245,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test manager.Setup(m => m.GetUserNameAsync(user, CancellationToken.None)).ReturnsAsync(user.UserName).Verifiable(); var context = new Mock(); var response = new Mock(); - response.Setup(r => r.SignIn(It.IsAny(), It.Is(v => v.IsPersistent == isPersistent))).Verifiable(); + response.Setup(r => r.SignIn(It.Is(v => v.IsPersistent == isPersistent), It.IsAny())).Verifiable(); context.Setup(c => c.Response).Returns(response.Object).Verifiable(); var id = new ClaimsIdentity(HttpAuthenticationManager.TwoFactorUserIdAuthenticationType); id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); @@ -311,7 +311,7 @@ namespace Microsoft.AspNet.Identity.Authentication.Test var context = new Mock(); var response = new Mock(); context.Setup(c => c.Response).Returns(response.Object).Verifiable(); - response.Setup(r => r.SignIn(It.Is(i => i.AuthenticationType == ClaimsIdentityOptions.DefaultAuthenticationType), It.Is(v => v.IsPersistent == isPersistent))).Verifiable(); + response.Setup(r => r.SignIn(It.Is(v => v.IsPersistent == isPersistent), It.Is(i => i.AuthenticationType == ClaimsIdentityOptions.DefaultAuthenticationType))).Verifiable(); var id = new ClaimsIdentity(HttpAuthenticationManager.TwoFactorRememberedAuthenticationType); id.AddClaim(new Claim(ClaimTypes.Name, user.Id)); var authResult = new AuthenticationResult(id, new AuthenticationProperties(), new AuthenticationDescription()); diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs b/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs index 62c5135778..1a3035ce12 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Identity.InMemory.Test var context = new Mock(); var response = new Mock(); context.Setup(c => c.Response).Returns(response.Object).Verifiable(); - response.Setup(r => r.SignIn(It.IsAny(), It.Is(v => v.IsPersistent == isPersistent))).Verifiable(); + response.Setup(r => r.SignIn(It.Is(v => v.IsPersistent == isPersistent), It.IsAny())).Verifiable(); var contextAccessor = new Mock>(); contextAccessor.Setup(a => a.Value).Returns(context.Object); app.UseServices(services =>