47 references to TwoFactorUserIdScheme
Microsoft.AspNetCore.Identity (22)
IdentityCookiesBuilderExtensions.cs (3)
100
builder.AddCookie(IdentityConstants.
TwoFactorUserIdScheme
, o =>
102
o.Cookie.Name = IdentityConstants.
TwoFactorUserIdScheme
;
109
return new OptionsBuilder<CookieAuthenticationOptions>(builder.Services, IdentityConstants.
TwoFactorUserIdScheme
);
IdentityServiceCollectionExtensions.cs (2)
80
.AddCookie(IdentityConstants.
TwoFactorUserIdScheme
, o =>
82
o.Cookie.Name = IdentityConstants.
TwoFactorUserIdScheme
;
SecurityStampValidator.cs (1)
182
/// Used to validate the <see cref="IdentityConstants.
TwoFactorUserIdScheme
"/> and
SignInManager.cs (16)
305
if (await _schemes.GetSchemeAsync(IdentityConstants.
TwoFactorUserIdScheme
) != null)
307
await Context.SignOutAsync(IdentityConstants.
TwoFactorUserIdScheme
);
588
var claimsIdentity = new ClaimsIdentity(IdentityConstants.
TwoFactorUserIdScheme
);
593
await Context.SignInAsync(IdentityConstants.
TwoFactorUserIdScheme
, claimsPrincipal, props);
682
var claimsIdentity = new ClaimsIdentity(IdentityConstants.
TwoFactorUserIdScheme
);
690
await Context.SignInAsync(IdentityConstants.
TwoFactorUserIdScheme
, claimsPrincipal, props);
759
var result = await Context.AuthenticateAsync(IdentityConstants.
TwoFactorUserIdScheme
);
760
await Context.SignOutAsync(IdentityConstants.
TwoFactorUserIdScheme
);
797
var result = await Context.AuthenticateAsync(IdentityConstants.
TwoFactorUserIdScheme
);
798
await Context.SignOutAsync(IdentityConstants.
TwoFactorUserIdScheme
);
906
if (await _schemes.GetSchemeAsync(IdentityConstants.
TwoFactorUserIdScheme
) != null)
908
await Context.SignOutAsync(IdentityConstants.
TwoFactorUserIdScheme
);
1169
var identity = new ClaimsIdentity(IdentityConstants.
TwoFactorUserIdScheme
);
1226
if (await _schemes.GetSchemeAsync(IdentityConstants.
TwoFactorUserIdScheme
) != null)
1230
await Context.SignInAsync(IdentityConstants.
TwoFactorUserIdScheme
, StoreTwoFactorInfo(userId, loginProvider));
1259
var result = await Context.AuthenticateAsync(IdentityConstants.
TwoFactorUserIdScheme
);
Microsoft.AspNetCore.Identity.InMemory.Test (1)
FunctionalTest.cs (1)
355
var result = await context.AuthenticateAsync(IdentityConstants.
TwoFactorUserIdScheme
);
Microsoft.AspNetCore.Identity.Test (24)
IdentityOptionsTest.cs (1)
96
Assert.Equal("d", options.Get(IdentityConstants.
TwoFactorUserIdScheme
).Cookie.Name);
SignInManagerTest.cs (23)
301
auth.Setup(a => a.SignInAsync(context, IdentityConstants.
TwoFactorUserIdScheme
,
345
auth.Setup(a => a.SignInAsync(context, IdentityConstants.
TwoFactorUserIdScheme
,
425
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
426
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
466
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
467
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
505
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
506
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
589
auth.Setup(a => a.SignOutAsync(context, IdentityConstants.
TwoFactorUserIdScheme
, It.IsAny<AuthenticationProperties>())).Returns(Task.FromResult(0)).Verifiable();
595
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
596
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
787
auth.Setup(a => a.SignOutAsync(context, IdentityConstants.
TwoFactorUserIdScheme
, It.IsAny<AuthenticationProperties>())).Returns(Task.FromResult(0)).Verifiable();
802
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
803
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
837
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
838
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
922
auth.Setup(a => a.SignOutAsync(context, IdentityConstants.
TwoFactorUserIdScheme
, It.IsAny<AuthenticationProperties>())).Returns(Task.FromResult(0)).Verifiable();
1303
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
1304
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
1369
auth.Setup(a => a.AuthenticateAsync(context, IdentityConstants.
TwoFactorUserIdScheme
))
1370
.ReturnsAsync(AuthenticateResult.Success(new AuthenticationTicket(id, null, IdentityConstants.
TwoFactorUserIdScheme
))).Verifiable();
1567
[IdentityConstants.
TwoFactorUserIdScheme
] = CreateCookieScheme(IdentityConstants.
TwoFactorUserIdScheme
),