Fixed parameter "role" cannot be resolved
Use 'nameof(*)' expression instead.
This commit is contained in:
parent
80ba15aaf4
commit
d1585617f9
|
|
@ -158,7 +158,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (role == null)
|
if (role == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("role");
|
throw new ArgumentNullException(nameof(role));
|
||||||
}
|
}
|
||||||
var result = await ValidateRoleInternal(role);
|
var result = await ValidateRoleInternal(role);
|
||||||
if (!result.Succeeded)
|
if (!result.Succeeded)
|
||||||
|
|
@ -195,7 +195,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (role == null)
|
if (role == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("role");
|
throw new ArgumentNullException(nameof(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
return UpdateRoleAsync(role);
|
return UpdateRoleAsync(role);
|
||||||
|
|
@ -213,7 +213,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (role == null)
|
if (role == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("role");
|
throw new ArgumentNullException(nameof(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Store.DeleteAsync(role, CancellationToken);
|
return Store.DeleteAsync(role, CancellationToken);
|
||||||
|
|
@ -231,7 +231,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (roleName == null)
|
if (roleName == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("roleName");
|
throw new ArgumentNullException(nameof(roleName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return await FindByNameAsync(NormalizeKey(roleName)) != null;
|
return await FindByNameAsync(NormalizeKey(roleName)) != null;
|
||||||
|
|
@ -320,7 +320,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (roleName == null)
|
if (roleName == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("roleName");
|
throw new ArgumentNullException(nameof(roleName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Store.FindByNameAsync(NormalizeKey(roleName), CancellationToken);
|
return Store.FindByNameAsync(NormalizeKey(roleName), CancellationToken);
|
||||||
|
|
@ -341,11 +341,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (claim == null)
|
if (claim == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("claim");
|
throw new ArgumentNullException(nameof(claim));
|
||||||
}
|
}
|
||||||
if (role == null)
|
if (role == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("role");
|
throw new ArgumentNullException(nameof(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
await claimStore.AddClaimAsync(role, claim, CancellationToken);
|
await claimStore.AddClaimAsync(role, claim, CancellationToken);
|
||||||
|
|
@ -367,7 +367,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (role == null)
|
if (role == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("role");
|
throw new ArgumentNullException(nameof(role));
|
||||||
}
|
}
|
||||||
|
|
||||||
await claimStore.RemoveClaimAsync(role, claim, CancellationToken);
|
await claimStore.RemoveClaimAsync(role, claim, CancellationToken);
|
||||||
|
|
@ -388,7 +388,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (role == null)
|
if (role == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("role");
|
throw new ArgumentNullException(nameof(role));
|
||||||
}
|
}
|
||||||
return claimStore.GetClaimsAsync(role, CancellationToken);
|
return claimStore.GetClaimsAsync(role, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -258,11 +258,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a flag indicating whether the backing user store supports returning
|
/// Gets a flag indicating whether the backing user store supports returning
|
||||||
/// <see cref="IQueryable"/> collections of information.
|
/// <see cref="IQueryable"/> collections of information.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// true if the backing user store supports returning <see cref="IQueryable"/> collections of
|
/// true if the backing user store supports returning <see cref="IQueryable"/> collections of
|
||||||
/// information, otherwise false.
|
/// information, otherwise false.
|
||||||
/// </value>
|
/// </value>
|
||||||
public virtual bool SupportsQueryableUsers
|
public virtual bool SupportsQueryableUsers
|
||||||
|
|
@ -353,7 +353,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the specified <paramref name="user"/> in the backing store with no password,
|
/// Creates the specified <paramref name="user"/> in the backing store with no password,
|
||||||
/// as an asynchronous operation.
|
/// as an asynchronous operation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user to create.</param>
|
/// <param name="user">The user to create.</param>
|
||||||
|
|
@ -393,7 +393,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
return UpdateUserAsync(user);
|
return UpdateUserAsync(user);
|
||||||
|
|
@ -412,7 +412,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
return Store.DeleteAsync(user, CancellationToken);
|
return Store.DeleteAsync(user, CancellationToken);
|
||||||
|
|
@ -443,14 +443,14 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (userName == null)
|
if (userName == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("userName");
|
throw new ArgumentNullException(nameof(userName));
|
||||||
}
|
}
|
||||||
userName = NormalizeKey(userName);
|
userName = NormalizeKey(userName);
|
||||||
return Store.FindByNameAsync(userName, CancellationToken);
|
return Store.FindByNameAsync(userName, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates the specified <paramref name="user"/> in the backing store with given password,
|
/// Creates the specified <paramref name="user"/> in the backing store with given password,
|
||||||
/// as an asynchronous operation.
|
/// as an asynchronous operation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user to create.</param>
|
/// <param name="user">The user to create.</param>
|
||||||
|
|
@ -465,11 +465,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var passwordStore = GetPasswordStore();
|
var passwordStore = GetPasswordStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (password == null)
|
if (password == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("password");
|
throw new ArgumentNullException(nameof(password));
|
||||||
}
|
}
|
||||||
var result = await UpdatePasswordHash(passwordStore, user, password);
|
var result = await UpdatePasswordHash(passwordStore, user, password);
|
||||||
if (!result.Succeeded)
|
if (!result.Succeeded)
|
||||||
|
|
@ -510,7 +510,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await Store.GetUserNameAsync(user, CancellationToken);
|
return await Store.GetUserNameAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -526,7 +526,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await Store.SetUserNameAsync(user, userName, CancellationToken);
|
await Store.SetUserNameAsync(user, userName, CancellationToken);
|
||||||
|
|
@ -546,7 +546,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a flag indicating whether the given <paramref name="password"/> is valid for the
|
/// Returns a flag indicating whether the given <paramref name="password"/> is valid for the
|
||||||
/// specified <paramref name="user"/>.
|
/// specified <paramref name="user"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user whose password should be validated.</param>
|
/// <param name="user">The user whose password should be validated.</param>
|
||||||
|
|
@ -592,7 +592,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var passwordStore = GetPasswordStore();
|
var passwordStore = GetPasswordStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
return passwordStore.HasPasswordAsync(user, CancellationToken);
|
return passwordStore.HasPasswordAsync(user, CancellationToken);
|
||||||
|
|
@ -614,7 +614,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var passwordStore = GetPasswordStore();
|
var passwordStore = GetPasswordStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
var hash = await passwordStore.GetPasswordHashAsync(user, CancellationToken);
|
var hash = await passwordStore.GetPasswordHashAsync(user, CancellationToken);
|
||||||
|
|
@ -648,7 +648,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var passwordStore = GetPasswordStore();
|
var passwordStore = GetPasswordStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -681,7 +681,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var passwordStore = GetPasswordStore();
|
var passwordStore = GetPasswordStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await UpdatePasswordHash(passwordStore, user, null, validatePassword: false);
|
await UpdatePasswordHash(passwordStore, user, null, validatePassword: false);
|
||||||
|
|
@ -719,7 +719,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var securityStore = GetSecurityStore();
|
var securityStore = GetSecurityStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await securityStore.GetSecurityStampAsync(user, CancellationToken);
|
return await securityStore.GetSecurityStampAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -741,7 +741,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
GetSecurityStore();
|
GetSecurityStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await UpdateSecurityStampInternal(user);
|
await UpdateSecurityStampInternal(user);
|
||||||
|
|
@ -750,10 +750,10 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Generates a password reset token for the specified <paramref name="user"/>, using
|
/// Generates a password reset token for the specified <paramref name="user"/>, using
|
||||||
/// the configured password reset token provider.
|
/// the configured password reset token provider.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user to generate a password reset token for.</param>
|
/// <param name="user">The user to generate a password reset token for.</param>
|
||||||
/// <returns>The <see cref="Task"/> that represents the asynchronous operation,
|
/// <returns>The <see cref="Task"/> that represents the asynchronous operation,
|
||||||
/// containing a password reset token for the specified <paramref name="user"/>.</returns>
|
/// containing a password reset token for the specified <paramref name="user"/>.</returns>
|
||||||
public virtual Task<string> GeneratePasswordResetTokenAsync(TUser user)
|
public virtual Task<string> GeneratePasswordResetTokenAsync(TUser user)
|
||||||
{
|
{
|
||||||
|
|
@ -777,7 +777,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the token is valid and the stamp matches
|
// Make sure the token is valid and the stamp matches
|
||||||
|
|
@ -808,11 +808,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var loginStore = GetLoginStore();
|
var loginStore = GetLoginStore();
|
||||||
if (loginProvider == null)
|
if (loginProvider == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("loginProvider");
|
throw new ArgumentNullException(nameof(loginProvider));
|
||||||
}
|
}
|
||||||
if (providerKey == null)
|
if (providerKey == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("providerKey");
|
throw new ArgumentNullException(nameof(providerKey));
|
||||||
}
|
}
|
||||||
return loginStore.FindByLoginAsync(loginProvider, providerKey, CancellationToken);
|
return loginStore.FindByLoginAsync(loginProvider, providerKey, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -834,15 +834,15 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var loginStore = GetLoginStore();
|
var loginStore = GetLoginStore();
|
||||||
if (loginProvider == null)
|
if (loginProvider == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("loginProvider");
|
throw new ArgumentNullException(nameof(loginProvider));
|
||||||
}
|
}
|
||||||
if (providerKey == null)
|
if (providerKey == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("providerKey");
|
throw new ArgumentNullException(nameof(providerKey));
|
||||||
}
|
}
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await loginStore.RemoveLoginAsync(user, loginProvider, providerKey, CancellationToken);
|
await loginStore.RemoveLoginAsync(user, loginProvider, providerKey, CancellationToken);
|
||||||
|
|
@ -865,11 +865,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var loginStore = GetLoginStore();
|
var loginStore = GetLoginStore();
|
||||||
if (login == null)
|
if (login == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("login");
|
throw new ArgumentNullException(nameof(login));
|
||||||
}
|
}
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
var existingUser = await FindByLoginAsync(login.LoginProvider, login.ProviderKey);
|
var existingUser = await FindByLoginAsync(login.LoginProvider, login.ProviderKey);
|
||||||
|
|
@ -895,7 +895,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var loginStore = GetLoginStore();
|
var loginStore = GetLoginStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await loginStore.GetLoginsAsync(user, CancellationToken);
|
return await loginStore.GetLoginsAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -915,11 +915,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (claim == null)
|
if (claim == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("claim");
|
throw new ArgumentNullException(nameof(claim));
|
||||||
}
|
}
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return AddClaimsAsync(user, new Claim[] { claim });
|
return AddClaimsAsync(user, new Claim[] { claim });
|
||||||
}
|
}
|
||||||
|
|
@ -939,11 +939,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (claims == null)
|
if (claims == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("claims");
|
throw new ArgumentNullException(nameof(claims));
|
||||||
}
|
}
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await claimStore.AddClaimsAsync(user, claims, CancellationToken);
|
await claimStore.AddClaimsAsync(user, claims, CancellationToken);
|
||||||
|
|
@ -966,15 +966,15 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (claim == null)
|
if (claim == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("claim");
|
throw new ArgumentNullException(nameof(claim));
|
||||||
}
|
}
|
||||||
if (newClaim == null)
|
if (newClaim == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("newClaim");
|
throw new ArgumentNullException(nameof(newClaim));
|
||||||
}
|
}
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await claimStore.ReplaceClaimAsync(user, claim, newClaim, CancellationToken);
|
await claimStore.ReplaceClaimAsync(user, claim, newClaim, CancellationToken);
|
||||||
|
|
@ -996,11 +996,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (claim == null)
|
if (claim == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("claim");
|
throw new ArgumentNullException(nameof(claim));
|
||||||
}
|
}
|
||||||
return RemoveClaimsAsync(user, new Claim[] { claim });
|
return RemoveClaimsAsync(user, new Claim[] { claim });
|
||||||
}
|
}
|
||||||
|
|
@ -1020,11 +1020,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (claims == null)
|
if (claims == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("claims");
|
throw new ArgumentNullException(nameof(claims));
|
||||||
}
|
}
|
||||||
|
|
||||||
await claimStore.RemoveClaimsAsync(user, claims, CancellationToken);
|
await claimStore.RemoveClaimsAsync(user, claims, CancellationToken);
|
||||||
|
|
@ -1044,7 +1044,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var claimStore = GetClaimStore();
|
var claimStore = GetClaimStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await claimStore.GetClaimsAsync(user, CancellationToken);
|
return await claimStore.GetClaimsAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1064,7 +1064,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var userRoleStore = GetUserRoleStore();
|
var userRoleStore = GetUserRoleStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
var normalizedRole = NormalizeKey(role);
|
var normalizedRole = NormalizeKey(role);
|
||||||
|
|
@ -1091,11 +1091,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var userRoleStore = GetUserRoleStore();
|
var userRoleStore = GetUserRoleStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (roles == null)
|
if (roles == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("roles");
|
throw new ArgumentNullException(nameof(roles));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var role in roles.Distinct())
|
foreach (var role in roles.Distinct())
|
||||||
|
|
@ -1125,7 +1125,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var userRoleStore = GetUserRoleStore();
|
var userRoleStore = GetUserRoleStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
var normalizedRole = NormalizeKey(role);
|
var normalizedRole = NormalizeKey(role);
|
||||||
|
|
@ -1164,11 +1164,11 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var userRoleStore = GetUserRoleStore();
|
var userRoleStore = GetUserRoleStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (roles == null)
|
if (roles == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("roles");
|
throw new ArgumentNullException(nameof(roles));
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var role in roles)
|
foreach (var role in roles)
|
||||||
|
|
@ -1194,7 +1194,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var userRoleStore = GetUserRoleStore();
|
var userRoleStore = GetUserRoleStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await userRoleStore.GetRolesAsync(user, CancellationToken);
|
return await userRoleStore.GetRolesAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1214,7 +1214,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var userRoleStore = GetUserRoleStore();
|
var userRoleStore = GetUserRoleStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await userRoleStore.IsInRoleAsync(user, NormalizeKey(role), CancellationToken);
|
return await userRoleStore.IsInRoleAsync(user, NormalizeKey(role), CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1230,7 +1230,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetEmailStore();
|
var store = GetEmailStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await store.GetEmailAsync(user, CancellationToken);
|
return await store.GetEmailAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1250,7 +1250,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetEmailStore();
|
var store = GetEmailStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await store.SetEmailAsync(user, email, CancellationToken);
|
await store.SetEmailAsync(user, email, CancellationToken);
|
||||||
|
|
@ -1272,7 +1272,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetEmailStore();
|
var store = GetEmailStore();
|
||||||
if (email == null)
|
if (email == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("email");
|
throw new ArgumentNullException(nameof(email));
|
||||||
}
|
}
|
||||||
return store.FindByEmailAsync(NormalizeKey(email), CancellationToken);
|
return store.FindByEmailAsync(NormalizeKey(email), CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1320,7 +1320,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetEmailStore();
|
var store = GetEmailStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!await VerifyUserTokenAsync(user, Options.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose, token))
|
if (!await VerifyUserTokenAsync(user, Options.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose, token))
|
||||||
|
|
@ -1346,7 +1346,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetEmailStore();
|
var store = GetEmailStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await store.GetEmailConfirmedAsync(user, CancellationToken);
|
return await store.GetEmailConfirmedAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1380,7 +1380,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the token is valid and the stamp matches
|
// Make sure the token is valid and the stamp matches
|
||||||
|
|
@ -1406,7 +1406,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetPhoneNumberStore();
|
var store = GetPhoneNumberStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await store.GetPhoneNumberAsync(user, CancellationToken);
|
return await store.GetPhoneNumberAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1426,7 +1426,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetPhoneNumberStore();
|
var store = GetPhoneNumberStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await store.SetPhoneNumberAsync(user, phoneNumber, CancellationToken);
|
await store.SetPhoneNumberAsync(user, phoneNumber, CancellationToken);
|
||||||
|
|
@ -1436,7 +1436,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the phone number for the specified <paramref name="user"/> if the specified
|
/// Sets the phone number for the specified <paramref name="user"/> if the specified
|
||||||
/// change <paramref name="token"/> is valid.
|
/// change <paramref name="token"/> is valid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user whose phone number to set.</param>
|
/// <param name="user">The user whose phone number to set.</param>
|
||||||
|
|
@ -1452,7 +1452,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetPhoneNumberStore();
|
var store = GetPhoneNumberStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!await VerifyChangePhoneNumberTokenAsync(user, token, phoneNumber))
|
if (!await VerifyChangePhoneNumberTokenAsync(user, token, phoneNumber))
|
||||||
|
|
@ -1480,7 +1480,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetPhoneNumberStore();
|
var store = GetPhoneNumberStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return store.GetPhoneNumberConfirmedAsync(user, CancellationToken);
|
return store.GetPhoneNumberConfirmedAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1546,7 +1546,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (tokenProvider == null)
|
if (tokenProvider == null)
|
||||||
{
|
{
|
||||||
|
|
@ -1582,7 +1582,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (tokenProvider == null)
|
if (tokenProvider == null)
|
||||||
{
|
{
|
||||||
|
|
@ -1606,13 +1606,13 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (provider == null)
|
if (provider == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("provider");
|
throw new ArgumentNullException(nameof(provider));
|
||||||
}
|
}
|
||||||
_tokenProviders[providerName] = provider;
|
_tokenProviders[providerName] = provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a list of valid two factor token providers for the specified <paramref name="user"/>,
|
/// Gets a list of valid two factor token providers for the specified <paramref name="user"/>,
|
||||||
/// as an asynchronous operation.
|
/// as an asynchronous operation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user the whose two factor authentication providers will be returned.</param>
|
/// <param name="user">The user the whose two factor authentication providers will be returned.</param>
|
||||||
|
|
@ -1625,7 +1625,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
var results = new List<string>();
|
var results = new List<string>();
|
||||||
foreach (var f in _tokenProviders)
|
foreach (var f in _tokenProviders)
|
||||||
|
|
@ -1653,7 +1653,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (!_tokenProviders.ContainsKey(tokenProvider))
|
if (!_tokenProviders.ContainsKey(tokenProvider))
|
||||||
{
|
{
|
||||||
|
|
@ -1684,7 +1684,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
ThrowIfDisposed();
|
ThrowIfDisposed();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (!_tokenProviders.ContainsKey(tokenProvider))
|
if (!_tokenProviders.ContainsKey(tokenProvider))
|
||||||
{
|
{
|
||||||
|
|
@ -1701,7 +1701,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user whose two factor authentication enabled status should be retrieved.</param>
|
/// <param name="user">The user whose two factor authentication enabled status should be retrieved.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The <see cref="Task"/> that represents the asynchronous operation, true if the specified <paramref name="user "/>
|
/// The <see cref="Task"/> that represents the asynchronous operation, true if the specified <paramref name="user "/>
|
||||||
/// has two factor authentication enabled, otherwise false.
|
/// has two factor authentication enabled, otherwise false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public virtual async Task<bool> GetTwoFactorEnabledAsync(TUser user)
|
public virtual async Task<bool> GetTwoFactorEnabledAsync(TUser user)
|
||||||
|
|
@ -1710,7 +1710,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserTwoFactorStore();
|
var store = GetUserTwoFactorStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await store.GetTwoFactorEnabledAsync(user, CancellationToken);
|
return await store.GetTwoFactorEnabledAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1730,7 +1730,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserTwoFactorStore();
|
var store = GetUserTwoFactorStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await store.SetTwoFactorEnabledAsync(user, enabled, CancellationToken);
|
await store.SetTwoFactorEnabledAsync(user, enabled, CancellationToken);
|
||||||
|
|
@ -1744,7 +1744,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user whose locked out status should be retrieved.</param>
|
/// <param name="user">The user whose locked out status should be retrieved.</param>
|
||||||
/// <returns>
|
/// <returns>
|
||||||
/// The <see cref="Task"/> that represents the asynchronous operation, true if the specified <paramref name="user "/>
|
/// The <see cref="Task"/> that represents the asynchronous operation, true if the specified <paramref name="user "/>
|
||||||
/// is locked out, otherwise false.
|
/// is locked out, otherwise false.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public virtual async Task<bool> IsLockedOutAsync(TUser user)
|
public virtual async Task<bool> IsLockedOutAsync(TUser user)
|
||||||
|
|
@ -1753,7 +1753,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
if (!await store.GetLockoutEnabledAsync(user, CancellationToken))
|
if (!await store.GetLockoutEnabledAsync(user, CancellationToken))
|
||||||
{
|
{
|
||||||
|
|
@ -1778,7 +1778,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
await store.SetLockoutEnabledAsync(user, enabled, CancellationToken);
|
await store.SetLockoutEnabledAsync(user, enabled, CancellationToken);
|
||||||
|
|
@ -1798,7 +1798,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await store.GetLockoutEnabledAsync(user, CancellationToken);
|
return await store.GetLockoutEnabledAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1817,7 +1817,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await store.GetLockoutEndDateAsync(user, CancellationToken);
|
return await store.GetLockoutEndDateAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1834,7 +1834,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!await store.GetLockoutEnabledAsync(user, CancellationToken))
|
if (!await store.GetLockoutEnabledAsync(user, CancellationToken))
|
||||||
|
|
@ -1847,8 +1847,8 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Increments the access failed count for the user as an asynchronous operation.
|
/// Increments the access failed count for the user as an asynchronous operation.
|
||||||
/// If the failed access account is greater than or equal to the configured maximum number of attempts,
|
/// If the failed access account is greater than or equal to the configured maximum number of attempts,
|
||||||
/// the user will be locked out for the configured lockout time span.
|
/// the user will be locked out for the configured lockout time span.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user whose failed access count to increment.</param>
|
/// <param name="user">The user whose failed access count to increment.</param>
|
||||||
|
|
@ -1859,7 +1859,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this puts the user over the threshold for lockout, lock them out and reset the access failed count
|
// If this puts the user over the threshold for lockout, lock them out and reset the access failed count
|
||||||
|
|
@ -1886,7 +1886,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await GetAccessFailedCountAsync(user) == 0)
|
if (await GetAccessFailedCountAsync(user) == 0)
|
||||||
|
|
@ -1898,7 +1898,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Retrieves the current number of failed accesses for the given <paramref name="user"/>.
|
/// Retrieves the current number of failed accesses for the given <paramref name="user"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="user">The user whose access failed count should be retrieved for.</param>
|
/// <param name="user">The user whose access failed count should be retrieved for.</param>
|
||||||
/// <returns>The <see cref="Task"/> that contains the result the asynchronous operation, the current failed access count
|
/// <returns>The <see cref="Task"/> that contains the result the asynchronous operation, the current failed access count
|
||||||
|
|
@ -1909,7 +1909,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserLockoutStore();
|
var store = GetUserLockoutStore();
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("user");
|
throw new ArgumentNullException(nameof(user));
|
||||||
}
|
}
|
||||||
return await store.GetAccessFailedCountAsync(user, CancellationToken);
|
return await store.GetAccessFailedCountAsync(user, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1928,7 +1928,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetClaimStore();
|
var store = GetClaimStore();
|
||||||
if (claim == null)
|
if (claim == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("claim");
|
throw new ArgumentNullException(nameof(claim));
|
||||||
}
|
}
|
||||||
return store.GetUsersForClaimAsync(claim, CancellationToken);
|
return store.GetUsersForClaimAsync(claim, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
@ -1947,7 +1947,7 @@ namespace Microsoft.AspNetCore.Identity
|
||||||
var store = GetUserRoleStore();
|
var store = GetUserRoleStore();
|
||||||
if (roleName == null)
|
if (roleName == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("role");
|
throw new ArgumentNullException(nameof(roleName));
|
||||||
}
|
}
|
||||||
|
|
||||||
return store.GetUsersInRoleAsync(NormalizeKey(roleName), CancellationToken);
|
return store.GetUsersInRoleAsync(NormalizeKey(roleName), CancellationToken);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue