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