зеркало из https://github.com/aspnet/Identity.git
SignOut all identity cookies except for RememberMe
Fixes https://github.com/aspnet/Identity/issues/211
This commit is contained in:
Родитель
91eac9f74e
Коммит
5c10f9e96b
|
@ -87,6 +87,8 @@ namespace Microsoft.AspNet.Identity
|
|||
public virtual void SignOut()
|
||||
{
|
||||
Context.Response.SignOut(IdentityOptions.ApplicationCookieAuthenticationType);
|
||||
Context.Response.SignOut(IdentityOptions.ExternalCookieAuthenticationType);
|
||||
Context.Response.SignOut(IdentityOptions.TwoFactorUserIdCookieAuthenticationType);
|
||||
}
|
||||
|
||||
private async Task<bool> IsLockedOut(TUser user, CancellationToken token)
|
||||
|
|
|
@ -485,6 +485,8 @@ namespace Microsoft.AspNet.Identity.Test
|
|||
var response = new Mock<HttpResponse>();
|
||||
context.Setup(c => c.Response).Returns(response.Object).Verifiable();
|
||||
response.Setup(r => r.SignOut(authenticationType)).Verifiable();
|
||||
response.Setup(r => r.SignOut(IdentityOptions.TwoFactorUserIdCookieAuthenticationType)).Verifiable();
|
||||
response.Setup(r => r.SignOut(IdentityOptions.ExternalCookieAuthenticationType)).Verifiable();
|
||||
var contextAccessor = new Mock<IContextAccessor<HttpContext>>();
|
||||
contextAccessor.Setup(a => a.Value).Returns(context.Object);
|
||||
var roleManager = MockHelpers.MockRoleManager<TestRole>();
|
||||
|
|
Загрузка…
Ссылка в новой задаче