2 writes to Options
Microsoft.AspNetCore.Identity.Test (1)
UserClaimsPrincipalFactoryTest.cs (1)
66
userManager.Object.
Options
= new IdentityOptions();
Microsoft.Extensions.Identity.Core (1)
UserManager.cs (1)
81
Options
= optionsAccessor?.Value ?? new IdentityOptions();
93 references to Options
Identity.ExternalClaims (1)
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (1)
91
user, _userManager.
Options
.Tokens.AuthenticatorTokenProvider, verificationCode);
IdentitySample.DefaultUI (1)
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
104
if (_userManager.
Options
.SignIn.RequireConfirmedAccount)
Microsoft.AspNetCore.Identity (1)
IdentityApiEndpointRouteBuilderExtensions.cs (1)
284
if (!await userManager.VerifyTwoFactorTokenAsync(user, userManager.
Options
.Tokens.AuthenticatorTokenProvider, tfaRequest.TwoFactorCode))
Microsoft.AspNetCore.Identity.Specification.Tests (22)
UserManagerSpecificationTests.cs (22)
302
manager.
Options
.User.RequireUniqueEmail = true;
409
manager.
Options
.User.RequireUniqueEmail = true;
424
manager.
Options
.User.RequireUniqueEmail = true;
501
manager.
Options
.Tokens.PasswordResetTokenProvider = "Static";
870
manager.
Options
.User.RequireUniqueEmail = true;
991
manager.
Options
.Tokens.PasswordResetTokenProvider = "Static";
1016
manager.
Options
.Tokens.PasswordResetTokenProvider = "Static";
1042
manager.
Options
.Tokens.PasswordResetTokenProvider = "Static";
1092
manager.
Options
.Tokens.EmailConfirmationTokenProvider = "Static";
1114
manager.
Options
.Tokens.EmailConfirmationTokenProvider = "Static";
1152
mgr.
Options
.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromHours(1);
1153
mgr.
Options
.Lockout.MaxFailedAccessAttempts = 0;
1174
mgr.
Options
.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromHours(1);
1175
mgr.
Options
.Lockout.MaxFailedAccessAttempts = 2;
1199
mgr.
Options
.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromHours(1);
1200
mgr.
Options
.Lockout.MaxFailedAccessAttempts = 2;
1227
mgr.
Options
.Lockout.DefaultLockoutTimeSpan = TimeSpan.FromHours(1);
1228
mgr.
Options
.Lockout.AllowedForNewUsers = false;
1229
mgr.
Options
.Lockout.MaxFailedAccessAttempts = 2;
1271
mgr.
Options
.Lockout.AllowedForNewUsers = false;
1434
manager.
Options
.Tokens.ChangePhoneNumberTokenProvider = "Yes";
1546
manager.
Options
.Tokens.ChangeEmailTokenProvider = "NewProvider2";
Microsoft.AspNetCore.Identity.Test (39)
PasswordValidatorTest.cs (30)
40
manager.
Options
.Password.RequireUppercase = false;
41
manager.
Options
.Password.RequireNonAlphanumeric = false;
42
manager.
Options
.Password.RequireLowercase = false;
43
manager.
Options
.Password.RequireDigit = false;
54
manager.
Options
.Password.RequireUppercase = false;
55
manager.
Options
.Password.RequireNonAlphanumeric = false;
56
manager.
Options
.Password.RequireLowercase = false;
57
manager.
Options
.Password.RequireDigit = false;
68
manager.
Options
.Password.RequireUppercase = false;
69
manager.
Options
.Password.RequireNonAlphanumeric = true;
70
manager.
Options
.Password.RequireLowercase = false;
71
manager.
Options
.Password.RequireDigit = false;
72
manager.
Options
.Password.RequiredLength = 0;
85
manager.
Options
.Password.RequireUppercase = false;
86
manager.
Options
.Password.RequireNonAlphanumeric = true;
87
manager.
Options
.Password.RequireLowercase = false;
88
manager.
Options
.Password.RequireDigit = false;
89
manager.
Options
.Password.RequiredLength = 0;
101
manager.
Options
.Password.RequireUppercase = false;
102
manager.
Options
.Password.RequireNonAlphanumeric = false;
103
manager.
Options
.Password.RequireLowercase = false;
104
manager.
Options
.Password.RequireDigit = false;
105
manager.
Options
.Password.RequiredLength = 0;
106
manager.
Options
.Password.RequiredUniqueChars = uniqueChars;
122
manager.
Options
.Password.RequireUppercase = false;
123
manager.
Options
.Password.RequireNonAlphanumeric = false;
124
manager.
Options
.Password.RequireLowercase = false;
125
manager.
Options
.Password.RequireDigit = false;
126
manager.
Options
.Password.RequiredLength = 0;
127
manager.
Options
.Password.RequiredUniqueChars = uniqueChars;
SignInManagerTest.cs (1)
822
var helper = SetupSignInManager(manager, context, null, manager.
Options
);
UserClaimsPrincipalFactoryTest.cs (5)
97
claims, c => c.Type == manager.
Options
.ClaimsIdentity.UserNameClaimType && c.Value == user.UserName);
98
Assert.Contains(claims, c => c.Type == manager.
Options
.ClaimsIdentity.UserIdClaimType && c.Value == user.Id);
99
Assert.Equal(supportsUserEmail, claims.Any(c => c.Type == manager.
Options
.ClaimsIdentity.EmailClaimType && c.Value == user.Email));
100
Assert.Equal(supportRoles, claims.Any(c => c.Type == manager.
Options
.ClaimsIdentity.RoleClaimType && c.Value == "Admin"));
101
Assert.Equal(supportRoles, claims.Any(c => c.Type == manager.
Options
.ClaimsIdentity.RoleClaimType && c.Value == "Local"));
UserManagerTest.cs (2)
26
Assert.NotNull(manager.
Options
);
1756
manager.
Options
.User.RequireUniqueEmail = true;
UserValidatorTest.cs (1)
77
manager.
Options
.User.AllowedUserNameCharacters = null;
Microsoft.AspNetCore.Identity.UI (6)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
211
if (_userManager.
Options
.SignIn.RequireConfirmedAccount)
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (1)
134
user, _userManager.
Options
.Tokens.AuthenticatorTokenProvider, verificationCode);
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
150
if (_userManager.
Options
.SignIn.RequireConfirmedAccount)
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
211
if (_userManager.
Options
.SignIn.RequireConfirmedAccount)
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (1)
134
user, _userManager.
Options
.Tokens.AuthenticatorTokenProvider, verificationCode);
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
150
if (_userManager.
Options
.SignIn.RequireConfirmedAccount)
Microsoft.Extensions.Identity.Core (23)
PasswordValidator.cs (1)
44
var options = manager.
Options
.Password;
UserManager.cs (19)
105
foreach (var providerName in
Options
.Tokens.ProviderMap.Keys)
107
var description =
Options
.Tokens.ProviderMap[providerName];
122
if (
Options
.Stores.ProtectPersonalData)
410
return principal.FindFirstValue(
Options
.ClaimsIdentity.UserNameClaimType);
422
return principal.FindFirstValue(
Options
.ClaimsIdentity.UserIdClaimType);
470
if (
Options
.Lockout.AllowedForNewUsers && SupportsUserLockout)
541
if (user == null &&
Options
.Stores.ProtectPersonalData)
606
if (
Options
.Stores.ProtectPersonalData)
864
return GenerateUserTokenAsync(user,
Options
.Tokens.PasswordResetTokenProvider, ResetPasswordTokenPurpose);
884
if (!await VerifyUserTokenAsync(user,
Options
.Tokens.PasswordResetTokenProvider, ResetPasswordTokenPurpose, token).ConfigureAwait(false))
1296
if (user == null &&
Options
.Stores.ProtectPersonalData)
1341
return GenerateUserTokenAsync(user,
Options
.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose);
1359
if (!await VerifyUserTokenAsync(user,
Options
.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose, token).ConfigureAwait(false))
1395
return GenerateUserTokenAsync(user,
Options
.Tokens.ChangeEmailTokenProvider, GetChangeEmailTokenPurpose(newEmail));
1414
if (!await VerifyUserTokenAsync(user,
Options
.Tokens.ChangeEmailTokenProvider, GetChangeEmailTokenPurpose(newEmail), token).ConfigureAwait(false))
1514
return GenerateUserTokenAsync(user,
Options
.Tokens.ChangePhoneNumberTokenProvider, ChangePhoneNumberTokenPurpose + ":" + phoneNumber);
1534
return VerifyUserTokenAsync(user,
Options
.Tokens.ChangePhoneNumberTokenProvider, ChangePhoneNumberTokenPurpose + ":" + phoneNumber, token);
1823
if (count <
Options
.Lockout.MaxFailedAccessAttempts)
1828
await store.SetLockoutEndDateAsync(user, DateTimeOffset.UtcNow.Add(
Options
.Lockout.DefaultLockoutTimeSpan),
UserValidator.cs (3)
45
if (manager.
Options
.User.RequireUniqueEmail)
61
else if (!string.IsNullOrEmpty(manager.
Options
.User.AllowedUserNameCharacters) &&
62
userName.Any(c => !manager.
Options
.User.AllowedUserNameCharacters.Contains(c)))