104 references to UserUpdateType
Microsoft.Extensions.Identity.Core (104)
UserManager.cs (70)
531return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.Update).ConfigureAwait(false); 535_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.Update, ex); 720return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.UserName).ConfigureAwait(false); 724_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.UserName, ex); 785await UpdateUserAndRecordMetricAsync(user, UserUpdateType.PasswordRehash).ConfigureAwait(false); 823_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.AddPassword); 828_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.AddPassword, ex); 869_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.ChangePassword); 874_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.ChangePassword, ex); 915return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemovePassword).ConfigureAwait(false); 919_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.RemovePassword, ex); 985return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SecurityStamp).ConfigureAwait(false); 989_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SecurityStamp, ex); 1027_metrics?.UpdateUser(typeof(TUser).FullName!, failureResult, UserUpdateType.ResetPassword); 1034_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.ResetPassword); 1037return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetPassword).ConfigureAwait(false); 1080return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveLogin).ConfigureAwait(false); 1084_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.RemoveLogin, ex); 1103_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.AddLogin); 1108_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.AddLogin, ex); 1178return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.AddClaims).ConfigureAwait(false); 1182_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.AddClaims, ex); 1208return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ReplaceClaim).ConfigureAwait(false); 1212_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.ReplaceClaim, ex); 1250return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveClaims).ConfigureAwait(false); 1254_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.RemoveClaims, ex); 1288_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.AddToRoles); 1293_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.AddToRoles, ex); 1327_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.AddToRoles); 1332_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.AddToRoles, ex); 1375_metrics?.UpdateUser(typeof(TUser).FullName!, failureResult, UserUpdateType.RemoveFromRoles); 1380return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveFromRoles).ConfigureAwait(false); 1415_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.RemoveFromRoles); 1420_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.RemoveFromRoles, ex); 1507return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetEmail).ConfigureAwait(false); 1511_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SetEmail, ex); 1597_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.ConfirmEmail); 1602_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.ConfirmEmail, ex); 1667_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.ChangeEmail); 1672_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.ChangeEmail, ex); 1691return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ChangeEmail).ConfigureAwait(false); 1727return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetPhoneNumber).ConfigureAwait(false); 1731_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SetPhoneNumber, ex); 1752_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.ChangePhoneNumber); 1757_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.ChangePhoneNumber, ex); 2042return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetTwoFactorEnabled).ConfigureAwait(false); 2046_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SetTwoFactorEnabled, ex); 2091return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetLockoutEnabled).ConfigureAwait(false); 2095_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SetLockoutEnabled, ex); 2142_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.SetLockoutEndDate); 2147_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SetLockoutEndDate, ex); 2186return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.AccessFailed).ConfigureAwait(false); 2192return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.AccessFailed).ConfigureAwait(false); 2196_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.AccessFailed, ex); 2211_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.ResetAccessFailedCount); 2216_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.ResetAccessFailedCount, ex); 2320return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetAuthenticationToken).ConfigureAwait(false); 2324_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SetAuthenticationToken, ex); 2347return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveAuthenticationToken).ConfigureAwait(false); 2351_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.RemoveAuthenticationToken, ex); 2381return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetAuthenticatorKey).ConfigureAwait(false); 2412var update = await UpdateUserAndRecordMetricAsync(user, UserUpdateType.GenerateNewTwoFactorRecoveryCodes).ConfigureAwait(false); 2421_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.GenerateNewTwoFactorRecoveryCodes, ex); 2514_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.RedeemTwoFactorRecoveryCode); 2519_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.RedeemTwoFactorRecoveryCode, ex); 2563_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.SetPasskey); 2568_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.SetPasskey, ex); 2648_metrics?.UpdateUser(typeof(TUser).FullName!, result, UserUpdateType.RemovePasskey); 2653_metrics?.UpdateUser(typeof(TUser).FullName!, result: null, UserUpdateType.RemovePasskey, ex); 2925private async Task<IdentityResult> UpdateUserAndRecordMetricAsync(TUser user, UserUpdateType updateType)
UserManagerMetrics.cs (34)
60internal void UpdateUser(string userType, IdentityResult? result, UserUpdateType updateType, Exception? exception = null) 211private static string GetUpdateType(UserUpdateType updateType) 215UserUpdateType.Update => "update", 216UserUpdateType.UserName => "user_name", 217UserUpdateType.AddPassword => "add_password", 218UserUpdateType.ChangePassword => "change_password", 219UserUpdateType.SecurityStamp => "security_stamp", 220UserUpdateType.ResetPassword => "reset_password", 221UserUpdateType.RemoveLogin => "remove_login", 222UserUpdateType.AddLogin => "add_login", 223UserUpdateType.AddClaims => "add_claims", 224UserUpdateType.ReplaceClaim => "replace_claim", 225UserUpdateType.RemoveClaims => "remove_claims", 226UserUpdateType.AddToRoles => "add_to_roles", 227UserUpdateType.RemoveFromRoles => "remove_from_roles", 228UserUpdateType.SetEmail => "set_email", 229UserUpdateType.ConfirmEmail => "confirm_email", 230UserUpdateType.PasswordRehash => "password_rehash", 231UserUpdateType.RemovePassword => "remove_password", 232UserUpdateType.ChangeEmail => "change_email", 233UserUpdateType.SetPhoneNumber => "set_phone_number", 234UserUpdateType.ChangePhoneNumber => "change_phone_number", 235UserUpdateType.SetTwoFactorEnabled => "set_two_factor_enabled", 236UserUpdateType.SetLockoutEnabled => "set_lockout_enabled", 237UserUpdateType.SetLockoutEndDate => "set_lockout_end_date", 238UserUpdateType.AccessFailed => "access_failed", 239UserUpdateType.ResetAccessFailedCount => "reset_access_failed_count", 240UserUpdateType.SetAuthenticationToken => "set_authentication_token", 241UserUpdateType.RemoveAuthenticationToken => "remove_authentication_token", 242UserUpdateType.ResetAuthenticatorKey => "reset_authenticator_key", 243UserUpdateType.GenerateNewTwoFactorRecoveryCodes => "generate_new_two_factor_recovery_codes", 244UserUpdateType.RedeemTwoFactorRecoveryCode => "redeem_two_factor_recovery_code", 245UserUpdateType.SetPasskey => "set_passkey", 246UserUpdateType.RemovePasskey => "remove_passkey",