Enabled xml doc generation
This commit is contained in:
parent
06f4c306b7
commit
e30653c71b
|
|
@ -1,12 +1,7 @@
|
|||
{
|
||||
"adx": { // Packages written by the ADX team and that ship on NuGet.org
|
||||
"rules": [
|
||||
"AssemblyHasDocumentFileRule",
|
||||
"AssemblyHasVersionAttributesRule",
|
||||
"AssemblyHasServicingAttributeRule",
|
||||
"AssemblyHasNeutralResourcesLanguageAttributeRule",
|
||||
"SatellitePackageRule",
|
||||
"StrictSemanticVersionValidationRule"
|
||||
"AdxVerificationCompositeRule"
|
||||
],
|
||||
"packages": {
|
||||
"Microsoft.AspNetCore.Identity": { },
|
||||
|
|
@ -15,12 +10,7 @@
|
|||
},
|
||||
"Default": { // Rules to run for packages not listed in any other set.
|
||||
"rules": [
|
||||
"AssemblyHasDocumentFileRule",
|
||||
"AssemblyHasVersionAttributesRule",
|
||||
"AssemblyHasServicingAttributeRule",
|
||||
"AssemblyHasNeutralResourcesLanguageAttributeRule",
|
||||
"SatellitePackageRule",
|
||||
"StrictSemanticVersionValidationRule"
|
||||
"DefaultCompositeRule"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -246,7 +246,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
/// <summary>
|
||||
/// Finds the role who has the specified ID as an asynchronous operation.
|
||||
/// </summary>
|
||||
/// <param name="roleId">The role ID to look for.</param>
|
||||
/// <param name="id">The role ID to look for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns>
|
||||
public virtual Task<TRole> FindByIdAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
|
||||
|
|
@ -260,7 +260,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
/// <summary>
|
||||
/// Finds the role who has the specified normalized name as an asynchronous operation.
|
||||
/// </summary>
|
||||
/// <param name="normalizedRoleName">The normalized role name to look for.</param>
|
||||
/// <param name="normalizedName">The normalized role name to look for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns>
|
||||
public virtual Task<TRole> FindByNameAsync(string normalizedName, CancellationToken cancellationToken = default(CancellationToken))
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
/// <param name="userId">The user ID to search for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userID"/> if it exists.
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userId"/> if it exists.
|
||||
/// </returns>
|
||||
public virtual Task<TUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
|
|
@ -327,7 +327,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
/// <param name="normalizedUserName">The normalized user name to search for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userID"/> if it exists.
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="normalizedUserName"/> if it exists.
|
||||
/// </returns>
|
||||
public virtual Task<TUser> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
|
|
@ -542,10 +542,10 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the <paramref name="claim"/> given to the specified <paramref name="user"/>.
|
||||
/// Adds the <paramref name="claims"/> given to the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="uuser">The user to add the claim to.</param>
|
||||
/// <param name="claim">The claim to add to the user.</param>
|
||||
/// <param name="user">The user to add the claim to.</param>
|
||||
/// <param name="claims">The claim to add to the user.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>The <see cref="Task"/> that represents the asynchronous operation.</returns>
|
||||
public virtual Task AddClaimsAsync(TUser user, IEnumerable<Claim> claims, CancellationToken cancellationToken = default(CancellationToken))
|
||||
|
|
@ -627,7 +627,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds the <paramref name=login"/> given to the specified <paramref name="user"/>.
|
||||
/// Adds the <paramref name="login"/> given to the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to add the login to.</param>
|
||||
/// <param name="login">The login to add to the user.</param>
|
||||
|
|
@ -659,10 +659,11 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the <paramref name=login"/> given from the specified <paramref name="user"/>.
|
||||
/// Removes the <paramref name="loginProvider"/> given from the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to remove the login from.</param>
|
||||
/// <param name="login">The login to remove from the user.</param>
|
||||
/// <param name="loginProvider">The login to remove from the user.</param>
|
||||
/// <param name="providerKey">The key provided by the <paramref name="loginProvider"/> to identify a user.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>The <see cref="Task"/> that represents the asynchronous operation.</returns>
|
||||
public virtual async Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../tools/Key.snk"
|
||||
"keyFile": "../../tools/Key.snk",
|
||||
"nowarn": [ "CS1591" ],
|
||||
"xmlDoc": true
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// </summary>
|
||||
/// <param name="purpose">The purpose the token will be used for.</param>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> to retrieve user properties from.</param>
|
||||
/// <param name="user">The <see cref="TUser"/> the token will be generated from.</param>
|
||||
/// <param name="user">The <typeparamref name="TUser"/> the token will be generated from.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> representing the generated token.</returns>
|
||||
public virtual async Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user)
|
||||
{
|
||||
|
|
@ -94,7 +94,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="purpose">The purpose the token was be used for.</param>
|
||||
/// <param name="token">The token to validate.</param>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> to retrieve user properties from.</param>
|
||||
/// <param name="user">The <see cref="TUser"/> the token was generated for.</param>
|
||||
/// <param name="user">The <typeparamref name="TUser"/> the token was generated for.</param>
|
||||
/// <returns>
|
||||
/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous validation,
|
||||
/// containing true if the token is valid, otherwise false.
|
||||
|
|
@ -147,11 +147,11 @@ namespace Microsoft.AspNetCore.Identity
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="boolean"/> indicating whether a token generated by this instance
|
||||
/// Returns a <see cref="bool"/> indicating whether a token generated by this instance
|
||||
/// can be used as a Two Factor Authentication token as an asynchronous operation.
|
||||
/// </summary>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> to retrieve user properties from.</param>
|
||||
/// <param name="user">The <see cref="TUser"/> the token was generated for.</param>
|
||||
/// <param name="user">The <typeparamref name="TUser"/> the token was generated for.</param>
|
||||
/// <returns>
|
||||
/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query,
|
||||
/// containing true if a token generated by this instance can be used as a Two Factor Authentication token, otherwise false.
|
||||
|
|
@ -167,7 +167,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// </summary>
|
||||
/// <param name="token">The token to generate notifications for.</param>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> to retrieve user properties from.</param>
|
||||
/// <param name="user">The <see cref="TUser"/> the token was generated for.</param>
|
||||
/// <param name="user">The <typeparamref name="TUser"/> the token was generated for.</param>
|
||||
/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous notification.</returns>
|
||||
public virtual Task NotifyAsync(string token, UserManager<TUser> manager, TUser user)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Checks if a two factor authentication token can be generated for the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> to retrieve the <paramref name="user"/> from.</param>
|
||||
/// <param name="user">The <see cref="TUser"/> to check for the possibility of generating a two factor authentication token.</param>
|
||||
/// <param name="user">The <typeparamref name="TUser"/> to check for the possibility of generating a two factor authentication token.</param>
|
||||
/// <returns>True if the user has an email address set, otherwise false.</returns>
|
||||
public override async Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user)
|
||||
{
|
||||
|
|
@ -26,7 +26,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// </summary>
|
||||
/// <param name="purpose">The purpose of the two factor authentication token.</param>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> to retrieve the <paramref name="user"/> from.</param>
|
||||
/// <param name="user">The <see cref="TUser"/> to check for the possibility of generating a two factor authentication token.</param>
|
||||
/// <param name="user">The <typeparamref name="TUser"/> to check for the possibility of generating a two factor authentication token.</param>
|
||||
/// <returns>A string suitable for use as entropy in token generation.</returns>
|
||||
public override async Task<string> GetUserModifierAsync(string purpose, UserManager<TUser> manager,
|
||||
TUser user)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Validates a security stamp of an identity as an asynchronous operation, and rebuilds the identity if the validation succeeds, otherwise rejects
|
||||
/// the identity.
|
||||
/// </summary>
|
||||
/// <param name="context">The context containing the <see cref="ClaimsPrincipal"/>and <see cref="AuthenticationProperties"/> to validate.</param>
|
||||
/// <param name="context">The context containing the <see cref="System.Security.Claims.ClaimsPrincipal"/>
|
||||
/// and <see cref="Http.Authentication.AuthenticationProperties"/> to validate.</param>
|
||||
/// <returns>The <see cref="Task"/> that represents the asynchronous validation operation.</returns>
|
||||
Task ValidateAsync(CookieValidatePrincipalContext context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Provides an abstraction for a factory to create a <see cref="ClaimsPrincipal"/> from a user.
|
||||
/// </summary>
|
||||
/// <typeparam name="TRole">The type encapsulating a user.</typeparam>
|
||||
/// <typeparam name="TUser">The type encapsulating a user.</typeparam>
|
||||
public interface IUserClaimsPrincipalFactory<TUser>
|
||||
where TUser : class
|
||||
{
|
||||
|
|
@ -17,7 +17,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Creates a <see cref="ClaimsPrincipal"/> from an user asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to create a <see cref="ClaimsPrincipal"/> from.</param>
|
||||
/// <param name="authenticationType">The name of the authentication method the <paramref name="user"/> was sourced from.</param>
|
||||
/// <returns>The <see cref="Task"/> that represents the asynchronous creation operation, containing the created <see cref="ClaimsPrincipal"/>.</returns>
|
||||
Task<ClaimsPrincipal> CreateAsync(TUser user);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="roleName">The name of the role to be checked.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing a flag indicating whether the specified <see cref="user"/> is
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing a flag indicating whether the specified <paramref name="user"/> is
|
||||
/// a member of the named role.
|
||||
/// </returns>
|
||||
Task<bool> IsInRoleAsync(TUser user, string roleName, CancellationToken cancellationToken);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="userId">The user ID to search for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userID"/> if it exists.
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userId"/> if it exists.
|
||||
/// </returns>
|
||||
Task<TUser> FindByIdAsync(string userId, CancellationToken cancellationToken);
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="normalizedUserName">The normalized user name to search for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userID"/> if it exists.
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="normalizedUserName"/> if it exists.
|
||||
/// </returns>
|
||||
Task<TUser> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
public interface IUserTokenProvider<TUser> where TUser : class
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates a token for the specified <paramref name="ref"/> and <paramref name="purpose"/>.
|
||||
/// Generates a token for the specified <paramref name="user"/> and <paramref name="purpose"/>.
|
||||
/// </summary>
|
||||
/// <param name="purpose">The purpose the token will be used for.</param>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> that can be used to retrieve user properties.</param>
|
||||
|
|
@ -49,13 +49,13 @@ namespace Microsoft.AspNetCore.Identity
|
|||
|
||||
/// <summary>
|
||||
/// Returns a flag indicating whether the token provider can generate a token suitable for two factor authentication token for
|
||||
/// the specified <paramref name="ref"/>.
|
||||
/// the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> that can be used to retrieve user properties.</param>
|
||||
/// <param name="user">The user a token could be generated for.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the a flag indicating if a two
|
||||
/// factor token could be generated by this provider for the specified <paramref name="user"/> and <paramref name="purpose"/>.
|
||||
/// factor token could be generated by this provider for the specified <paramref name="user"/>.
|
||||
/// The task will return true if a two factor authentication token could be generated, otherwise false.
|
||||
/// </returns>
|
||||
Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds an <see cref="IUserValidator"/> for the <seealso cref="UserType"/>.
|
||||
/// Adds an <see cref="IUserValidator{TUser}"/> for the <seealso cref="UserType"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The user type to validate.</typeparam>
|
||||
/// <returns>The current <see cref="IdentityBuilder"/> instance.</returns>
|
||||
|
|
@ -80,7 +80,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Adds an <see cref="IdentityErrorDescriber"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of the error describer.</typeparam>
|
||||
/// <typeparam name="TDescriber">The type of the error describer.</typeparam>
|
||||
/// <returns>The current <see cref="IdentityBuilder"/> instance.</returns>
|
||||
public virtual IdentityBuilder AddErrorDescriber<TDescriber>() where TDescriber : IdentityErrorDescriber
|
||||
{
|
||||
|
|
|
|||
|
|
@ -231,7 +231,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Returns an <see cref="IdentityError"/> indicating a password entered does not contain a non-alphanumeric character, which is required by the password policy.
|
||||
/// </summary>
|
||||
/// <param name="length">The length that is not long enough.</param>
|
||||
/// <returns>An <see cref="IdentityError"/> indicating a password entered does not contain a non-alphanumeric character.</returns>
|
||||
public virtual IdentityError PasswordRequiresNonAlphanumeric()
|
||||
{
|
||||
|
|
@ -245,7 +244,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Returns an <see cref="IdentityError"/> indicating a password entered does not contain a numeric character, which is required by the password policy.
|
||||
/// </summary>
|
||||
/// <param name="length">The length that is not long enough.</param>
|
||||
/// <returns>An <see cref="IdentityError"/> indicating a password entered does not contain a numeric character.</returns>
|
||||
public virtual IdentityError PasswordRequiresDigit()
|
||||
{
|
||||
|
|
@ -259,7 +257,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Returns an <see cref="IdentityError"/> indicating a password entered does not contain a lower case letter, which is required by the password policy.
|
||||
/// </summary>
|
||||
/// <param name="length">The length that is not long enough.</param>
|
||||
/// <returns>An <see cref="IdentityError"/> indicating a password entered does not contain a lower case letter.</returns>
|
||||
public virtual IdentityError PasswordRequiresLower()
|
||||
{
|
||||
|
|
@ -273,7 +270,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Returns an <see cref="IdentityError"/> indicating a password entered does not contain an upper case letter, which is required by the password policy.
|
||||
/// </summary>
|
||||
/// <param name="length">The length that is not long enough.</param>
|
||||
/// <returns>An <see cref="IdentityError"/> indicating a password entered does not contain an upper case letter.</returns>
|
||||
public virtual IdentityError PasswordRequiresUpper()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Creates a new instance of <see cref="PasswordHasher{TUser}"/>.
|
||||
/// </summary>
|
||||
/// <param name="options">The options for this instance.</param>
|
||||
/// <param name="optionsAccessor">The options for this instance.</param>
|
||||
public PasswordHasher(IOptions<PasswordHasherOptions> optionsAccessor = null)
|
||||
{
|
||||
var options = optionsAccessor?.Value ?? new PasswordHasherOptions();
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ namespace Microsoft.AspNetCore.Identity
|
|||
{
|
||||
/// <summary>
|
||||
/// Returns a flag indicating whether the token provider can generate a token suitable for two factor authentication token for
|
||||
/// the specified <paramref name="ref"/>.
|
||||
/// the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> that can be used to retrieve user properties.</param>
|
||||
/// <param name="user">The user a token could be generated for.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the a flag indicating if a two
|
||||
/// factor token could be generated by this provider for the specified <paramref name="user"/> and <paramref name="purpose"/>.
|
||||
/// factor token could be generated by this provider for the specified <paramref name="user"/>.
|
||||
/// The task will return true if a two factor authentication token could be generated as the user has
|
||||
/// a telephone number, otherwise false.
|
||||
/// </returns>
|
||||
|
|
|
|||
|
|
@ -94,11 +94,11 @@ namespace Microsoft.AspNetCore.Identity
|
|||
internal ILookupNormalizer KeyNormalizer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an IQueryable collection of Roles if the persistence store is an <see cref="IQueryableRoleStore"/>,
|
||||
/// Gets an IQueryable collection of Roles if the persistence store is an <see cref="IQueryableRoleStore{TRole}"/>,
|
||||
/// otherwise throws a <see cref="NotSupportedException"/>.
|
||||
/// </summary>
|
||||
/// <value>An IQueryable collection of Roles if the persistence store is an <see cref="IQueryableRoleStore"/>.</value>
|
||||
/// <exception cref="NotSupportedException">Thrown if the persistence store is not an <see cref="IQueryableRoleStore"/>.</exception>
|
||||
/// <value>An IQueryable collection of Roles if the persistence store is an <see cref="IQueryableRoleStore{TRole}"/>.</value>
|
||||
/// <exception cref="NotSupportedException">Thrown if the persistence store is not an <see cref="IQueryableRoleStore{TRole}"/>.</exception>
|
||||
/// <remarks>
|
||||
/// Callers to this property should use <see cref="SupportsQueryableRoles"/> to ensure the backing role store supports
|
||||
/// returning an IQueryable list of roles.
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Validates a security stamp of an identity as an asynchronous operation, and rebuilds the identity if the validation succeeds, otherwise rejects
|
||||
/// the identity.
|
||||
/// </summary>
|
||||
/// <param name="context">The context containing the <see cref="ClaimsPrincipal"/>and <see cref="AuthenticationProperties"/> to validate.</param>
|
||||
/// <param name="context">The context containing the <see cref="System.Security.Claims.ClaimsPrincipal"/>
|
||||
/// and <see cref="Http.Authentication.AuthenticationProperties"/> to validate.</param>
|
||||
/// <returns>The <see cref="Task"/> that represents the asynchronous validation operation.</returns>
|
||||
public virtual async Task ValidateAsync(CookieValidatePrincipalContext context)
|
||||
{
|
||||
|
|
@ -83,7 +84,8 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Validates a principal against a user's stored security stamp.
|
||||
/// the identity.
|
||||
/// </summary>
|
||||
/// <param name="context">The context containing the <see cref="ClaimsPrincipal"/>and <see cref="AuthenticationProperties"/> to validate.</param>
|
||||
/// <param name="context">The context containing the <see cref="System.Security.Claims.ClaimsPrincipal"/>
|
||||
/// and <see cref="Http.Authentication.AuthenticationProperties"/> to validate.</param>
|
||||
/// <returns>The <see cref="Task"/> that represents the asynchronous validation operation.</returns>
|
||||
public static Task ValidatePrincipalAsync(CookieValidatePrincipalContext context)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -193,10 +193,9 @@ namespace Microsoft.AspNetCore.Identity
|
|||
|
||||
/// <summary>
|
||||
/// Validates the security stamp for the specified <paramref name="principal"/> against
|
||||
/// the persisted stamp for the <paramref name="userId"/>, as an asynchronous operation.
|
||||
/// the persisted stamp for the current user, as an asynchronous operation.
|
||||
/// </summary>
|
||||
/// <param name="principal">The principal whose stamp should be validated.</param>
|
||||
/// <param name="userId">The ID for the user.</param>
|
||||
/// <returns>The task object representing the asynchronous operation. The task will contain the <typeparamref name="TUser"/>
|
||||
/// if the stamp matches the persisted value, otherwise it will return false.</returns>
|
||||
public virtual async Task<TUser> ValidateSecurityStampAsync(ClaimsPrincipal principal)
|
||||
|
|
@ -271,7 +270,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="userName">The user name to sign in.</param>
|
||||
/// <param name="password">The password to attempt to sign in with.</param>
|
||||
/// <param name="isPersistent">Flag indicating whether the sign-in cookie should persist after the browser is closed.</param>
|
||||
/// <param name="shouldLockout">Flag indicating if the user account should be locked if the sign in fails.</param>
|
||||
/// <param name="lockoutOnFailure">Flag indicating if the user account should be locked if the sign in fails.</param>
|
||||
/// <returns>The task object representing the asynchronous operation containing the <see name="SignInResult"/>
|
||||
/// for the sign-in attempt.</returns>
|
||||
public virtual async Task<SignInResult> PasswordSignInAsync(string userName, string password,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
where TUser : class
|
||||
{
|
||||
/// <summary>
|
||||
/// Generates a token for the specified <paramref name="ref"/> and <paramref name="purpose"/>.
|
||||
/// Generates a token for the specified <paramref name="user"/> and <paramref name="purpose"/>.
|
||||
/// </summary>
|
||||
/// <param name="purpose">The purpose the token will be used for.</param>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> that can be used to retrieve user properties.</param>
|
||||
|
|
@ -93,13 +93,13 @@ namespace Microsoft.AspNetCore.Identity
|
|||
|
||||
/// <summary>
|
||||
/// Returns a flag indicating whether the token provider can generate a token suitable for two factor authentication token for
|
||||
/// the specified <paramref name="ref"/>.
|
||||
/// the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="manager">The <see cref="UserManager{TUser}"/> that can be used to retrieve user properties.</param>
|
||||
/// <param name="user">The user a token could be generated for.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the a flag indicating if a two
|
||||
/// factor token could be generated by this provider for the specified <paramref name="user"/> and <paramref name="purpose"/>.
|
||||
/// factor token could be generated by this provider for the specified <paramref name="user"/>.
|
||||
/// The task will return true if a two factor authentication token could be generated, otherwise false.
|
||||
/// </returns>
|
||||
public abstract Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
where TRole : class
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ClaimsIdentityFactory"/> class.
|
||||
/// Initializes a new instance of the <see cref="UserClaimsPrincipalFactory{TUser, TRole}"/> class.
|
||||
/// </summary>
|
||||
/// <param name="userManager">The <see cref="UserManager{TUser}"/> to retrieve user information from.</param>
|
||||
/// <param name="roleManager">The <see cref="RoleManager{TRole}"/> to retrieve a user's roles from.</param>
|
||||
|
|
@ -74,7 +74,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Creates a <see cref="ClaimsPrincipal"/> from an user asynchronously.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to create a <see cref="ClaimsPrincipal"/> from.</param>
|
||||
/// <param name="authenticationType">The name of the authentication method the <paramref name="user"/> was sourced from.</param>
|
||||
/// <returns>The <see cref="Task"/> that represents the asynchronous creation operation, containing the created <see cref="ClaimsPrincipal"/>.</returns>
|
||||
public virtual async Task<ClaimsPrincipal> CreateAsync(TUser user)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,9 +44,8 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="passwordValidators">A collection of <see cref="IPasswordValidator{TUser}"/> to validate passwords against.</param>
|
||||
/// <param name="keyNormalizer">The <see cref="ILookupNormalizer"/> to use when generating index keys for users.</param>
|
||||
/// <param name="errors">The <see cref="IdentityErrorDescriber"/> used to provider error messages.</param>
|
||||
/// <param name="tokenProviders"></param>
|
||||
/// <param name="services">The <see cref="IServiceProvider"/> used to resolve services.</param>
|
||||
/// <param name="logger">The logger used to log messages, warnings and errors.</param>
|
||||
/// <param name="contextAccessor">The accessor used to access the <see cref="HttpContext"/>.</param>
|
||||
public UserManager(IUserStore<TUser> store,
|
||||
IOptions<IdentityOptions> optionsAccessor,
|
||||
IPasswordHasher<TUser> passwordHasher,
|
||||
|
|
@ -423,9 +422,8 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Finds and returns a user, if any, who has the specified <paramref name="userId"/>.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user ID to search for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userID"/> if it exists.
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userId"/> if it exists.
|
||||
/// </returns>
|
||||
public virtual Task<TUser> FindByIdAsync(string userId)
|
||||
{
|
||||
|
|
@ -437,9 +435,8 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Finds and returns a user, if any, who has the specified user name.
|
||||
/// </summary>
|
||||
/// <param name="userName">The user name to search for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userID"/> if it exists.
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userName"/> if it exists.
|
||||
/// </returns>
|
||||
public virtual Task<TUser> FindByNameAsync(string userName)
|
||||
{
|
||||
|
|
@ -959,7 +956,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="user">The user to replace the claim on.</param>
|
||||
/// <param name="claim">The claim to replace.</param>
|
||||
/// <param name="newClaim">The new claim to replace the existing <paramref name="claim"/> with.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/>
|
||||
/// of the operation.
|
||||
|
|
@ -988,7 +984,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Removes the specified <paramref name="claim"/> from the given <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to remove the specified <paramref name="claims"/> from.</param>
|
||||
/// <param name="user">The user to remove the specified <paramref name="claim"/> from.</param>
|
||||
/// <param name="claim">The <see cref="Claim"/> to remove.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/>
|
||||
|
|
@ -1057,7 +1053,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Add the specified <paramref name="user"/> to the named role.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to add to the named role.</param>
|
||||
/// <param name="roleName">The name of the role to add the user to.</param>
|
||||
/// <param name="role">The name of the role to add the user to.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/>
|
||||
/// of the operation.
|
||||
|
|
@ -1084,7 +1080,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Add the specified <paramref name="user"/> to the named roles.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to add to the named roles.</param>
|
||||
/// <param name="roleName">The name of the roles to add the user to.</param>
|
||||
/// <param name="roles">The name of the roles to add the user to.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/>
|
||||
/// of the operation.
|
||||
|
|
@ -1118,7 +1114,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Removes the specified <paramref name="user"/> from the named role.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to remove from the named role.</param>
|
||||
/// <param name="roleName">The name of the role to remove the user from.</param>
|
||||
/// <param name="role">The name of the role to remove the user from.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/>
|
||||
/// of the operation.
|
||||
|
|
@ -1157,7 +1153,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Removes the specified <paramref name="user"/> from the named roles.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to remove from the named roles.</param>
|
||||
/// <param name="roleName">The name of the roles to remove the user from.</param>
|
||||
/// <param name="roles">The name of the roles to remove the user from.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing the <see cref="IdentityResult"/>
|
||||
/// of the operation.
|
||||
|
|
@ -1209,7 +1205,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <param name="user">The user whose role membership should be checked.</param>
|
||||
/// <param name="role">The name of the role to be checked.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing a flag indicating whether the specified <see cref="user"/> is
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, containing a flag indicating whether the specified <paramref name="user"/> is
|
||||
/// a member of the named role.
|
||||
/// </returns>
|
||||
public virtual async Task<bool> IsInRoleAsync(TUser user, string role)
|
||||
|
|
@ -1227,7 +1223,6 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Gets the email address for the specified <paramref name="user"/>.
|
||||
/// </summary>
|
||||
/// <param name="user">The user whose email should be returned.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <returns>The task object containing the results of the asynchronous operation, the email address for the specified <paramref name="user"/>.</returns>
|
||||
public virtual async Task<string> GetEmailAsync(TUser user)
|
||||
{
|
||||
|
|
@ -1267,8 +1262,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Gets the user, if any, associated with the specified, normalized email address.
|
||||
/// </summary>
|
||||
/// <param name="normalizedEmail">The normalized email address to return the user for.</param>
|
||||
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
|
||||
/// <param name="email">The normalized email address to return the user for.</param>
|
||||
/// <returns>
|
||||
/// The task object containing the results of the asynchronous lookup operation, the user if any associated with the specified normalized email address.
|
||||
/// </returns>
|
||||
|
|
@ -1361,6 +1355,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// Generates an email change token for the specified user.
|
||||
/// </summary>
|
||||
/// <param name="user">The user to generate an email change token for.</param>
|
||||
/// <param name="newEmail">The new email address.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, an email change token.
|
||||
/// </returns>
|
||||
|
|
@ -1725,6 +1720,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// as an asynchronous operation.
|
||||
/// </summary>
|
||||
/// <param name="user">The user whose two factor authentication enabled status should be set.</param>
|
||||
/// <param name="enabled">A flag indicating whether the specified <paramref name="user"/> has two factor authentication enabled.</param>
|
||||
/// <returns>
|
||||
/// The <see cref="Task"/> that represents the asynchronous operation, the <see cref="IdentityResult"/> of the operation
|
||||
/// </returns>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNetCore.Identity
|
|||
/// <summary>
|
||||
/// Provides validation services for user classes.
|
||||
/// </summary>
|
||||
/// <typeparam name="TRole">The type encapsulating a user.</typeparam>
|
||||
/// <typeparam name="TUser">The type encapsulating a user.</typeparam>
|
||||
public class UserValidator<TUser> : IUserValidator<TUser> where TUser : class
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@
|
|||
"version": "1.0.0-*",
|
||||
"compilationOptions": {
|
||||
"warningsAsErrors": true,
|
||||
"keyFile": "../../tools/Key.snk"
|
||||
"keyFile": "../../tools/Key.snk",
|
||||
"nowarn": [ "CS1591" ],
|
||||
"xmlDoc": true
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
Loading…
Reference in New Issue