diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityDbContext.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityDbContext.cs index afc5ae9f5d..2d42b50202 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityDbContext.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityDbContext.cs @@ -8,43 +8,101 @@ using Microsoft.Data.Entity.Metadata; namespace Microsoft.AspNet.Identity.EntityFramework { + /// + /// Base class for the Entity Framework database context used for identity. + /// public class IdentityDbContext : IdentityDbContext { } + /// + /// Base class for the Entity Framework database context used for identity. + /// + /// The type of the user objects. public class IdentityDbContext : IdentityDbContext where TUser : IdentityUser { } + /// + /// Base class for the Entity Framework database context used for identity. + /// + /// The type of user objects. + /// The type of role objects. + /// The type of the primary key for users and roles. public class IdentityDbContext : DbContext where TUser : IdentityUser where TRole : IdentityRole where TKey : IEquatable { + /// + /// Initializes a new instance of . + /// + /// The options to be used by a . public IdentityDbContext(DbContextOptions options) : base(options) { } + /// + /// Initializes a new instance of the class using an . + /// + /// The service provider to be used. public IdentityDbContext(IServiceProvider serviceProvider) : base(serviceProvider) { } + /// + /// Initializes a new instance of the class using an . + /// + /// The options to be used by a . + /// The service provider to be used. public IdentityDbContext(IServiceProvider serviceProvider, DbContextOptions options) : base(serviceProvider, options) { } + /// + /// Initializes a new instance of the class. + /// protected IdentityDbContext() { } + /// + /// Gets or sets the of Users. + /// public DbSet Users { get; set; } + + /// + /// Gets or sets the of User claims. + /// public DbSet> UserClaims { get; set; } + + /// + /// Gets or sets the of User logins. + /// public DbSet> UserLogins { get; set; } + + /// + /// Gets or sets the of User roles. + /// public DbSet> UserRoles { get; set; } + + /// + /// Gets or sets the of roles. + /// public DbSet Roles { get; set; } + + /// + /// Gets or sets the of role claims. + /// public DbSet> RoleClaims { get; set; } + /// + /// Configures the schema needed for the identity framework. + /// + /// + /// The builder being used to construct the model for this context. + /// protected override void OnModelCreating(ModelBuilder builder) { builder.Entity(b => diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkBuilderExtensions.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkBuilderExtensions.cs index 0918bfdce9..7e10a62091 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkBuilderExtensions.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkBuilderExtensions.cs @@ -3,6 +3,7 @@ using System; using Microsoft.AspNet.Identity; +using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.Data.Entity; using Microsoft.Extensions.DependencyInjection.Extensions; @@ -10,19 +11,57 @@ namespace Microsoft.Extensions.DependencyInjection { public static class IdentityEntityFrameworkBuilderExtensions { + /// + /// Adds an Entity Framework implementation of identity information stores. + /// + /// The Entity Framework database context to use. + /// The instance this method extends. + /// The instance this method extends. public static IdentityBuilder AddEntityFrameworkStores(this IdentityBuilder builder) where TContext : DbContext { - builder.Services.TryAdd(IdentityEntityFrameworkServices.GetDefaultServices(builder.UserType, builder.RoleType, typeof(TContext))); + builder.Services.TryAdd(GetDefaultServices(builder.UserType, builder.RoleType, typeof(TContext))); return builder; } + /// + /// Adds an Entity Framework implementation of identity information stores. + /// + /// The Entity Framework database context to use. + /// The type of the primary key used for the users and roles. + /// The instance this method extends. + /// The instance this method extends. public static IdentityBuilder AddEntityFrameworkStores(this IdentityBuilder builder) where TContext : DbContext where TKey : IEquatable { - builder.Services.TryAdd(IdentityEntityFrameworkServices.GetDefaultServices(builder.UserType, builder.RoleType, typeof(TContext), typeof(TKey))); + builder.Services.TryAdd(GetDefaultServices(builder.UserType, builder.RoleType, typeof(TContext), typeof(TKey))); return builder; } + + private static IServiceCollection GetDefaultServices(Type userType, Type roleType, Type contextType, Type keyType = null) + { + Type userStoreType; + Type roleStoreType; + if (keyType != null) + { + userStoreType = typeof(UserStore<,,,>).MakeGenericType(userType, roleType, contextType, keyType); + roleStoreType = typeof(RoleStore<,,>).MakeGenericType(roleType, contextType, keyType); + } + else + { + userStoreType = typeof(UserStore<,,>).MakeGenericType(userType, roleType, contextType); + roleStoreType = typeof(RoleStore<,>).MakeGenericType(roleType, contextType); + } + + var services = new ServiceCollection(); + services.AddScoped( + typeof(IUserStore<>).MakeGenericType(userType), + userStoreType); + services.AddScoped( + typeof(IRoleStore<>).MakeGenericType(roleType), + roleStoreType); + return services; + } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkServices.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkServices.cs deleted file mode 100644 index f51b2c3288..0000000000 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityEntityFrameworkServices.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. - -using System; -using Microsoft.AspNet.Identity.EntityFramework; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace Microsoft.AspNet.Identity -{ - /// - /// Default services - /// - public class IdentityEntityFrameworkServices - { - public static IServiceCollection GetDefaultServices(Type userType, Type roleType, Type contextType, Type keyType = null) - { - Type userStoreType; - Type roleStoreType; - if (keyType != null) - { - userStoreType = typeof(UserStore<,,,>).MakeGenericType(userType, roleType, contextType, keyType); - roleStoreType = typeof(RoleStore<,,>).MakeGenericType(roleType, contextType, keyType); - } - else - { - userStoreType = typeof(UserStore<,,>).MakeGenericType(userType, roleType, contextType); - roleStoreType = typeof(RoleStore<,>).MakeGenericType(roleType, contextType); - } - - var services = new ServiceCollection(); - services.AddScoped( - typeof(IUserStore<>).MakeGenericType(userType), - userStoreType); - services.AddScoped( - typeof(IRoleStore<>).MakeGenericType(roleType), - roleStoreType); - return services; - } - } -} \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs index c479b9ad82..7970168f0a 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs @@ -7,22 +7,28 @@ using System.Collections.Generic; namespace Microsoft.AspNet.Identity.EntityFramework { /// - /// Represents a Role entity + /// The default implementation of which uses a string as the primary key. /// public class IdentityRole : IdentityRole { /// - /// Constructor + /// Initializes a new instance of . /// + /// + /// The Id property is initialized to from a new GUID string value. + /// public IdentityRole() { Id = Guid.NewGuid().ToString(); } /// - /// Constructor + /// Initializes a new instance of . /// - /// + /// The role name. + /// + /// The Id property is initialized to from a new GUID string value. + /// public IdentityRole(string roleName) : this() { Name = roleName; @@ -30,41 +36,48 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Represents a Role entity + /// Represents a role in the identity system /// - /// + /// The type used for the primary key for the role. public class IdentityRole where TKey : IEquatable { + /// + /// Initializes a new instance of . + /// public IdentityRole() { } /// - /// Constructor + /// Initializes a new instance of . /// - /// + /// The role name. public IdentityRole(string roleName) : this() { Name = roleName; } /// - /// Navigation property for users in the role + /// Navigation property for the users in this role. /// public virtual ICollection> Users { get; } = new List>(); /// - /// Navigation property for claims in the role + /// Navigation property for claims in this role. /// public virtual ICollection> Claims { get; } = new List>(); /// - /// Role id + /// Gets or sets the primary key for this role. /// public virtual TKey Id { get; set; } /// - /// Role name + /// Gets or sets the name for this role. /// public virtual string Name { get; set; } + + /// + /// Gets or sets the normalized name for this role. + /// public virtual string NormalizedName { get; set; } /// @@ -73,9 +86,9 @@ namespace Microsoft.AspNet.Identity.EntityFramework public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString(); /// - /// Returns a friendly name + /// Returns the name of the role. /// - /// + /// The name of the role. public override string ToString() { return Name; diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRoleClaim.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRoleClaim.cs index 211283f65c..49da1c8d21 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRoleClaim.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRoleClaim.cs @@ -6,28 +6,28 @@ using System; namespace Microsoft.AspNet.Identity.EntityFramework { /// - /// EntityType that represents one specific role claim + /// Represents a claim that is granted to all users within a role. /// - /// + /// The type of the primary key of the role associated with this claim. public class IdentityRoleClaim where TKey : IEquatable { /// - /// Primary key + /// Gets or sets the identifier for this role claim. /// public virtual int Id { get; set; } /// - /// User Id for the role this claim belongs to + /// Gets or sets the of the primary key of the role associated with this claim. /// public virtual TKey RoleId { get; set; } /// - /// Claim type + /// Gets or sets the claim type for this claim. /// public virtual string ClaimType { get; set; } /// - /// Claim value + /// Gets or sets the claim value for this claim. /// public virtual string ClaimValue { get; set; } } diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs index ce9932f5e0..7d5552ae3f 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs @@ -6,108 +6,155 @@ using System.Collections.Generic; namespace Microsoft.AspNet.Identity.EntityFramework { + /// + /// The default implementation of which uses a string as a primary key. + /// public class IdentityUser : IdentityUser { + /// + /// Initializes a new instance of . + /// + /// + /// The Id property is initialized to from a new GUID string value. + /// public IdentityUser() { Id = Guid.NewGuid().ToString(); } + /// + /// Initializes a new instance of . + /// + /// The user name. + /// + /// The Id property is initialized to from a new GUID string value. + /// public IdentityUser(string userName) : this() { UserName = userName; } } + /// + /// Represents a user in the identity system + /// + /// The type used for the primary key for the user. public class IdentityUser where TKey : IEquatable { + /// + /// Initializes a new instance of . + /// public IdentityUser() { } + /// + /// Initializes a new instance of . + /// + /// The user name. public IdentityUser(string userName) : this() { UserName = userName; } + /// + /// + /// Gets or sets the primary key for this user. public virtual TKey Id { get; set; } + + /// + /// Gets or sets the user name for this user. + /// public virtual string UserName { get; set; } + + /// + /// Gets or sets the normalized user name for this user. + /// public virtual string NormalizedUserName { get; set; } /// - /// Email + /// Gets or sets the email address for this user. /// public virtual string Email { get; set; } + /// + /// Gets or sets the normalized email address for this user. + /// public virtual string NormalizedEmail { get; set; } /// - /// True if the email is confirmed, default is false + /// Gets or sets a flag indicating if a user has confirmed their email address. /// + /// True if the email address has been confirmed, otherwise false. public virtual bool EmailConfirmed { get; set; } /// - /// The salted/hashed form of the user password + /// Gets or sets a salted and hashed representation of the password for this user. /// public virtual string PasswordHash { get; set; } /// - /// A random value that should change whenever a users credentials change (password changed, login removed) + /// A random value that must change whenever a users credentials change (password changed, login removed) /// public virtual string SecurityStamp { get; set; } /// - /// A random value that should change whenever a user is persisted to the store + /// A random value that must change whenever a user is persisted to the store /// public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString(); /// - /// PhoneNumber for the user + /// Gets or sets a telephone number for the user. /// public virtual string PhoneNumber { get; set; } /// - /// True if the phone number is confirmed, default is false + /// Gets or sets a flag indicating if a user has confirmed their telephone address. /// + /// True if the telephone number has been confirmed, otherwise false. public virtual bool PhoneNumberConfirmed { get; set; } /// - /// Is two factor enabled for the user + /// Gets or sets a flag indicating if two factor authentication is enabled for this user. /// + /// True if 2fa is enabled, otherwise false. public virtual bool TwoFactorEnabled { get; set; } /// - /// DateTime in UTC when lockout ends, any time in the past is considered not locked out. + /// Gets or sets the date and time, in UTC, when any user lockout ends. /// + /// + /// A value in the past means the user is not locked out. + /// public virtual DateTimeOffset? LockoutEnd { get; set; } /// - /// Is lockout enabled for this user + /// Gets or sets a flag indicating if this user is locked out. /// + /// True if the user is locked out, otherwise false. public virtual bool LockoutEnabled { get; set; } /// - /// Used to record failures for the purposes of lockout + /// Gets or sets the number of failed login attempts for the current user. /// public virtual int AccessFailedCount { get; set; } /// - /// Navigation property for users in the role + /// Navigation property for the roles this user belongs to. /// public virtual ICollection> Roles { get; } = new List>(); /// - /// Navigation property for users claims + /// Navigation property for the claims this user possesses. /// public virtual ICollection> Claims { get; } = new List>(); /// - /// Navigation property for users logins + /// Navigation property for this users login accounts. /// public virtual ICollection> Logins { get; } = new List>(); /// - /// Returns a friendly name + /// Returns the username for this user. /// - /// public override string ToString() { return UserName; diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserClaim.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserClaim.cs index d41959e870..2a38eede43 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserClaim.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserClaim.cs @@ -6,28 +6,28 @@ using System; namespace Microsoft.AspNet.Identity.EntityFramework { /// - /// EntityType that represents one specific user claim + /// Represents a claim that a user possesses. /// - /// + /// The type used for the primary key for this user that possesses this claim. public class IdentityUserClaim where TKey : IEquatable { /// - /// Primary key + /// Gets or sets the identifier for this user claim. /// public virtual int Id { get; set; } /// - /// User Id for the user who owns this claim + /// Gets or sets the of the primary key of the user associated with this claim. /// public virtual TKey UserId { get; set; } /// - /// Claim type + /// Gets or sets the claim type for this claim. /// public virtual string ClaimType { get; set; } /// - /// Claim value + /// Gets or sets the claim value for this claim. /// public virtual string ClaimValue { get; set; } } diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserLogin.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserLogin.cs index c22cc63874..09c6060802 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserLogin.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserLogin.cs @@ -6,28 +6,28 @@ using System; namespace Microsoft.AspNet.Identity.EntityFramework { /// - /// Entity type for a user's login (i.e. facebook, google) + /// Represents a login and its associated provider for a user. /// - /// + /// The type of the primary key of the user associated with this login. public class IdentityUserLogin where TKey : IEquatable { /// - /// The login provider for the login (i.e. facebook, google) + /// Gets or sets the login provider for the login (e.g. facebook, google) /// public virtual string LoginProvider { get; set; } /// - /// Key representing the login for the provider + /// Gets or sets the unique provider identifier for this login. /// public virtual string ProviderKey { get; set; } /// - /// Display name for the login + /// Gets or sets the friendly name used in a UI for this login. /// public virtual string ProviderDisplayName { get; set; } /// - /// User Id for the user who owns this login + /// Gets or sets the of the primary key of the user associated with this login. /// public virtual TKey UserId { get; set; } } diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserRole.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserRole.cs index 4bab4e1d9a..2235d0fd77 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserRole.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUserRole.cs @@ -6,18 +6,18 @@ using System; namespace Microsoft.AspNet.Identity.EntityFramework { /// - /// EntityType that represents a user belonging to a role + /// Represents the link between a user and a role. /// - /// + /// The type of the primary key used for users and roles. public class IdentityUserRole where TKey : IEquatable { /// - /// UserId for the user that is in the role + /// Gets or sets the primary key of the user that is linked to a role. /// public virtual TKey UserId { get; set; } /// - /// RoleId for the role + /// Gets or sets the primary key of the role that is linked to the user. /// public virtual TKey RoleId { get; set; } } diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/RoleStore.cs b/src/Microsoft.AspNet.Identity.EntityFramework/RoleStore.cs index 1013987899..c8a29b5c93 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/RoleStore.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/RoleStore.cs @@ -9,16 +9,24 @@ using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using Microsoft.Data.Entity; -using Microsoft.Data.Entity.Update; namespace Microsoft.AspNet.Identity.EntityFramework { + /// + /// Creates a new instance of a persistence store for roles. + /// + /// The type of the class representing a role public class RoleStore : RoleStore where TRole : IdentityRole { public RoleStore(DbContext context, IdentityErrorDescriber describer = null) : base(context, describer) { } } + /// + /// Creates a new instance of a persistence store for roles. + /// + /// The type of the class representing a role. + /// The type of the data context class used to access the store. public class RoleStore : RoleStore where TRole : IdentityRole where TContext : DbContext @@ -26,6 +34,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework public RoleStore(TContext context, IdentityErrorDescriber describer = null) : base(context, describer) { } } + /// + /// Creates a new instance of a persistence store for roles. + /// + /// The type of the class representing a role. + /// The type of the data context class used to access the store. + /// The type of the primary key for a role. public class RoleStore : IQueryableRoleStore, IRoleClaimStore @@ -46,18 +60,27 @@ namespace Microsoft.AspNet.Identity.EntityFramework private bool _disposed; + /// + /// Gets the database context for this store. + /// public TContext Context { get; private set; } /// - /// Used to generate public API error messages + /// Gets or sets the for any error that occurred with the current operation. /// public IdentityErrorDescriber ErrorDescriber { get; set; } /// - /// If true will call SaveChanges after CreateAsync/UpdateAsync/DeleteAsync + /// Gets or sets a flag indicating if changes should be persisted after CreateAsync, UpdateAsync and DeleteAsync are called. /// + /// + /// True if changes should be automatically persisted, otherwise false. + /// public bool AutoSaveChanges { get; set; } = true; + /// Saves the current store. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. private async Task SaveChanges(CancellationToken cancellationToken) { if (AutoSaveChanges) @@ -66,6 +89,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } } + /// + /// Creates a new role in a store as an asynchronous operation. + /// + /// The role to create in the store. + /// The used to propagate notifications that the operation should be canceled. + /// A that represents the of the asynchronous query. public async virtual Task CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -79,6 +108,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return IdentityResult.Success; } + /// + /// Updates a role in a store as an asynchronous operation. + /// + /// The role to update in the store. + /// The used to propagate notifications that the operation should be canceled. + /// A that represents the of the asynchronous query. public async virtual Task UpdateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -101,6 +136,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return IdentityResult.Success; } + /// + /// Deletes a role from the store as an asynchronous operation. + /// + /// The role to delete from the store. + /// The used to propagate notifications that the operation should be canceled. + /// A that represents the of the asynchronous query. public async virtual Task DeleteAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -121,6 +162,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return IdentityResult.Success; } + /// + /// Gets the ID for a role from the store as an asynchronous operation. + /// + /// The role whose ID should be returned. + /// The used to propagate notifications that the operation should be canceled. + /// A that contains the ID of the role. public Task GetRoleIdAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -132,6 +179,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(ConvertIdToString(role.Id)); } + /// + /// Gets the name of a role from the store as an asynchronous operation. + /// + /// The role whose name should be returned. + /// The used to propagate notifications that the operation should be canceled. + /// A that contains the name of the role. public Task GetRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -143,6 +196,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(role.Name); } + /// + /// Sets the name of a role in the store as an asynchronous operation. + /// + /// The role whose name should be set. + /// The name of the role. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public Task SetRoleNameAsync(TRole role, string roleName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -155,6 +215,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(0); } + /// + /// Converts the provided to a strongly typed key object. + /// + /// The id to convert. + /// An instance of representing the provided . public virtual TKey ConvertIdFromString(string id) { if (id == null) @@ -164,6 +229,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework return (TKey)TypeDescriptor.GetConverter(typeof(TKey)).ConvertFromInvariantString(id); } + /// + /// Converts the provided to its string representation. + /// + /// The id to convert. + /// An representation of the provided . public virtual string ConvertIdToString(TKey id) { if (id.Equals(default(TKey))) @@ -174,11 +244,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Find a role by id + /// Finds the role who has the specified ID as an asynchronous operation. /// - /// - /// - /// + /// The role ID to look for. + /// The used to propagate notifications that the operation should be canceled. + /// A that result of the look up. public virtual Task FindByIdAsync(string id, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -188,11 +258,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Find a role by normalized name + /// Finds the role who has the specified normalized name as an asynchronous operation. /// - /// - /// - /// + /// The normalized role name to look for. + /// The used to propagate notifications that the operation should be canceled. + /// A that result of the look up. public virtual Task FindByNameAsync(string normalizedName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -200,6 +270,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Roles.FirstOrDefaultAsync(r => r.NormalizedName == normalizedName, cancellationToken); } + /// + /// Get a role's normalized name as an asynchronous operation. + /// + /// The role whose normalized name should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// A that contains the name of the role. public virtual Task GetNormalizedRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -211,6 +287,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(role.NormalizedName); } + /// + /// Set a role's normalized name as an asynchronous operation. + /// + /// The role whose normalized name should be set. + /// The normalized name to set + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetNormalizedRoleNameAsync(TRole role, string normalizedName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -232,13 +315,19 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Dispose the store + /// Dispose the stores /// public void Dispose() { _disposed = true; } + /// + /// Get the claims associated with the specified as an asynchronous operation. + /// + /// The role whose claims should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// A that contains the claims granted to a role. public async Task> GetClaimsAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) { ThrowIfDisposed(); @@ -250,6 +339,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return await RoleClaims.Where(rc => rc.RoleId.Equals(role.Id)).Select(c => new Claim(c.ClaimType, c.ClaimValue)).ToListAsync(cancellationToken); } + /// + /// Adds the given to the specified . + /// + /// The role to add the claim to. + /// The claim to add to the role. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public Task AddClaimAsync(TRole role, Claim claim, CancellationToken cancellationToken = default(CancellationToken)) { ThrowIfDisposed(); @@ -267,6 +363,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(false); } + /// + /// Removes the given from the specified . + /// + /// The role to remove the claim from. + /// The claim to remove from the role. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public async Task RemoveClaimAsync(TRole role, Claim claim, CancellationToken cancellationToken = default(CancellationToken)) { ThrowIfDisposed(); @@ -285,6 +388,9 @@ namespace Microsoft.AspNet.Identity.EntityFramework } } + /// + /// A navigation property for the roles the store contains. + /// public virtual IQueryable Roles { get { return Context.Set(); } diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/UserStore.cs b/src/Microsoft.AspNet.Identity.EntityFramework/UserStore.cs index d6c52bb37c..2132bf5b30 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/UserStore.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/UserStore.cs @@ -10,21 +10,34 @@ using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using Microsoft.Data.Entity; -using Microsoft.Data.Entity.Update; namespace Microsoft.AspNet.Identity.EntityFramework { + /// + /// Creates a new instance of a persistence store for users, using the default implementation + /// of with a string as a primary key. + /// public class UserStore : UserStore> { public UserStore(DbContext context, IdentityErrorDescriber describer = null) : base(context, describer) { } } + /// + /// Creates a new instance of a persistence store for the specified user type. + /// + /// The type representing a user. public class UserStore : UserStore where TUser : IdentityUser, new() { public UserStore(DbContext context, IdentityErrorDescriber describer = null) : base(context, describer) { } } + /// + /// Creates a new instance of a persistence store for the specified user and role types. + /// + /// The type representing a user. + /// The type representing a role. + /// The type of the data context class used to access the store. public class UserStore : UserStore where TUser : IdentityUser, new() where TRole : IdentityRole, new() @@ -33,6 +46,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework public UserStore(TContext context, IdentityErrorDescriber describer = null) : base(context, describer) { } } + /// + /// Represents a new instance of a persistence store for the specified user and role types. + /// + /// The type representing a user. + /// The type representing a role. + /// The type of the data context class used to access the store. + /// The type of the primary key for a role. public class UserStore : IUserLoginStore, IUserRoleStore, @@ -50,6 +70,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework where TKey : IEquatable { + /// + /// Creates a new instance of . + /// + /// The context used to access the store. + /// The used to describe store errors. public UserStore(TContext context, IdentityErrorDescriber describer = null) { if (context == null) @@ -62,23 +87,38 @@ namespace Microsoft.AspNet.Identity.EntityFramework private bool _disposed; + /// + /// Gets the database context for this store. + /// public TContext Context { get; private set; } /// - /// Used to generate public API error messages + /// Gets or sets the for any error that occurred with the current operation. /// public IdentityErrorDescriber ErrorDescriber { get; set; } /// - /// If true will call SaveChanges after CreateAsync/UpdateAsync/DeleteAsync + /// Gets or sets a flag indicating if changes should be persisted after CreateAsync, UpdateAsync and DeleteAsync are called. /// + /// + /// True if changes should be automatically persisted, otherwise false. + /// public bool AutoSaveChanges { get; set; } = true; + /// Saves the current store. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. private Task SaveChanges(CancellationToken cancellationToken) { return AutoSaveChanges ? Context.SaveChangesAsync(cancellationToken) : Task.FromResult(0); } + /// + /// Gets the user identifier for the specified . + /// + /// The user whose identifier should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the identifier for the specified . public virtual Task GetUserIdAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -90,6 +130,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(ConvertIdToString(user.Id)); } + /// + /// Gets the user name for the specified . + /// + /// The user whose name should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the name for the specified . public virtual Task GetUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -101,6 +147,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(user.UserName); } + /// + /// Sets the given for the specified . + /// + /// The user whose name should be set. + /// The user name to set. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetUserNameAsync(TUser user, string userName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -113,6 +166,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(0); } + /// + /// Gets the normalized user name for the specified . + /// + /// The user whose normalized name should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the normalized user name for the specified . public virtual Task GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -124,6 +183,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(user.NormalizedUserName); } + /// + /// Sets the given normalized name for the specified . + /// + /// The user whose name should be set. + /// The normalized name to set. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetNormalizedUserNameAsync(TUser user, string normalizedName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -136,6 +202,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(0); } + /// + /// Creates the specified in the user store. + /// + /// The user to create. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the of the creation operation. public async virtual Task CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -149,6 +221,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return IdentityResult.Success; } + /// + /// Updates the specified in the user store. + /// + /// The user to update. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the of the update operation. public async virtual Task UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -172,6 +250,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework return IdentityResult.Success; } + /// + /// Deletes the specified from the user store. + /// + /// The user to delete. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the of the update operation. public async virtual Task DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -194,11 +278,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Find a user by id + /// Finds and returns a user, if any, who has the specified . /// - /// - /// - /// + /// The user ID to search for. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The that represents the asynchronous operation, containing the user matching the specified if it exists. + /// public virtual Task FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -207,6 +293,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Users.FirstOrDefaultAsync(u => u.Id.Equals(id), cancellationToken); } + /// + /// Converts the provided to a strongly typed key object. + /// + /// The id to convert. + /// An instance of representing the provided . public virtual TKey ConvertIdFromString(string id) { if (id == null) @@ -216,6 +307,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework return (TKey)TypeDescriptor.GetConverter(typeof(TKey)).ConvertFromInvariantString(id); } + /// + /// Converts the provided to its string representation. + /// + /// The id to convert. + /// An representation of the provided . public virtual string ConvertIdToString(TKey id) { if (id.Equals(default(TKey))) @@ -226,11 +322,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Find a user by normalized name + /// Finds and returns a user, if any, who has the specified normalized user name. /// - /// - /// - /// + /// The normalized user name to search for. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The that represents the asynchronous operation, containing the user matching the specified if it exists. + /// public virtual Task FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -238,18 +336,21 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Users.FirstOrDefaultAsync(u => u.NormalizedUserName == normalizedUserName, cancellationToken); } + /// + /// A navigation property for the users the store contains. + /// public virtual IQueryable Users { get { return Context.Set(); } } /// - /// Set the password hash for a user + /// Sets the password hash for a user. /// - /// - /// - /// - /// + /// The user to set the password hash for. + /// The password hash to set. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetPasswordHashAsync(TUser user, string passwordHash, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -263,11 +364,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Get the password hash for a user + /// Gets the password hash for a user. /// - /// - /// - /// + /// The user to retrieve the password hash for. + /// The used to propagate notifications that the operation should be canceled. + /// A that contains the password hash for the user. public virtual Task GetPasswordHashAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -280,11 +381,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Returns true if the user has a password set + /// Returns a flag indicating if the specified user has a password. /// - /// - /// - /// + /// The user to retrieve the password hash for. + /// The used to propagate notifications that the operation should be canceled. + /// A containing a flag indicating if the specified user has a password. If the + /// user has a password the returned value with be true, otherwise it will be false. public virtual Task HasPasswordAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -292,12 +394,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Add a user to a role + /// Adds the given to the specified . /// - /// - /// - /// - /// + /// The user to add the role to. + /// The role to add. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public async virtual Task AddToRoleAsync(TUser user, string roleName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -306,7 +408,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework { throw new ArgumentNullException(nameof(user)); } - if (String.IsNullOrWhiteSpace(roleName)) + if (string.IsNullOrWhiteSpace(roleName)) { throw new ArgumentException(Resources.ValueCannotBeNullOrEmpty, nameof(roleName)); } @@ -320,12 +422,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Remove a user from a role + /// Removes the given from the specified . /// - /// - /// - /// - /// + /// The user to remove the role from. + /// The role to remove. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public async virtual Task RemoveFromRoleAsync(TUser user, string roleName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -334,7 +436,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework { throw new ArgumentNullException(nameof(user)); } - if (String.IsNullOrWhiteSpace(roleName)) + if (string.IsNullOrWhiteSpace(roleName)) { throw new ArgumentException(Resources.ValueCannotBeNullOrEmpty, nameof(roleName)); } @@ -350,11 +452,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Get the names of the roles a user is a member of + /// Retrieves the roles the specified is a member of. /// - /// - /// - /// + /// The user whose roles should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// A that contains the roles the user is a member of. public virtual async Task> GetRolesAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -372,12 +474,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Returns true if the user is in the named role + /// Returns a flag indicating if the specified user is a member of the give . /// - /// - /// - /// - /// + /// The user whose role membership should be checked. + /// The role to check membership of + /// The used to propagate notifications that the operation should be canceled. + /// A containing a flag indicating if the specified user is a member of the given group. If the + /// user is a member of the group the returned value with be true, otherwise it will be false. public virtual async Task IsInRoleAsync(TUser user, string roleName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -409,7 +512,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Dispose the store + /// Dispose the store /// public void Dispose() { @@ -421,6 +524,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework private DbSet> UserRoles { get { return Context.Set>(); } } private DbSet> UserLogins { get { return Context.Set>(); } } + /// + /// Get the claims associated with the specified as an asynchronous operation. + /// + /// The user whose claims should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// A that contains the claims granted to a user. public async virtual Task> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { ThrowIfDisposed(); @@ -432,6 +541,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return await UserClaims.Where(uc => uc.UserId.Equals(user.Id)).Select(c => new Claim(c.ClaimType, c.ClaimValue)).ToListAsync(cancellationToken); } + /// + /// Adds the given to the specified . + /// + /// The user to add the claim to. + /// The claim to add to the user. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task AddClaimsAsync(TUser user, IEnumerable claims, CancellationToken cancellationToken = default(CancellationToken)) { ThrowIfDisposed(); @@ -450,6 +566,14 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(false); } + /// + /// Replaces the on the specified , with the . + /// + /// The role to replace the claim on. + /// The claim replace. + /// The new claim replacing the . + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public async virtual Task ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim, CancellationToken cancellationToken = default(CancellationToken)) { ThrowIfDisposed(); @@ -474,6 +598,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } } + /// + /// Removes the given from the specified . + /// + /// The user to remove the claims from. + /// The claim to remove. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public async virtual Task RemoveClaimsAsync(TUser user, IEnumerable claims, CancellationToken cancellationToken = default(CancellationToken)) { ThrowIfDisposed(); @@ -495,6 +626,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } } + /// + /// Adds the given to the specified . + /// + /// The user to add the login to. + /// The login to add to the user. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task AddLoginAsync(TUser user, UserLoginInfo login, CancellationToken cancellationToken = default(CancellationToken)) { @@ -520,6 +658,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(false); } + /// + /// Removes the given from the specified . + /// + /// The user to remove the login from. + /// The login to remove from the user. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual async Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) { @@ -537,6 +682,14 @@ namespace Microsoft.AspNet.Identity.EntityFramework } } + /// + /// Retrieves the associated logins for the specified . + /// + /// The user whose associated logins to retrieve. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The for the asynchronous operation, containing a list of for the specified , if any. + /// public async virtual Task> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -550,6 +703,15 @@ namespace Microsoft.AspNet.Identity.EntityFramework .Select(l => new UserLoginInfo(l.LoginProvider, l.ProviderKey, l.ProviderDisplayName)).ToListAsync(cancellationToken); } + /// + /// Retrieves the user associated with the specified login provider and login provider key.. + /// + /// The login provider who provided the . + /// The key provided by the to identify a user. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The for the asynchronous operation, containing the user, if any which matched the specified login provider and key. + /// public async virtual Task FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) { @@ -565,11 +727,15 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Returns whether the user email is confirmed + /// Gets a flag indicating whether the email address for the specified has been verified, true if the email address is verified otherwise + /// false. /// - /// - /// - /// + /// The user whose email confirmation status should be returned. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The task object containing the results of the asynchronous operation, a flag indicating whether the email address for the specified + /// has been confirmed or not. + /// public virtual Task GetEmailConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -582,12 +748,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Set IsConfirmed on the user + /// Sets the flag indicating whether the specified 's email address has been confirmed or not. /// - /// - /// - /// - /// + /// The user whose email confirmation status should be set. + /// A flag indicating if the email address has been confirmed, true if the address is confirmed otherwise false. + /// The used to propagate notifications that the operation should be canceled. + /// The task object representing the asynchronous operation. public virtual Task SetEmailConfirmedAsync(TUser user, bool confirmed, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -601,12 +767,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Set the user email + /// Sets the address for a . /// - /// - /// - /// - /// + /// The user whose email should be set. + /// The email to set. + /// The used to propagate notifications that the operation should be canceled. + /// The task object representing the asynchronous operation. public virtual Task SetEmailAsync(TUser user, string email, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -620,11 +786,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Get the user's email + /// Gets the email address for the specified . /// - /// - /// - /// + /// The user whose email should be returned. + /// The used to propagate notifications that the operation should be canceled. + /// The task object containing the results of the asynchronous operation, the email address for the specified . public virtual Task GetEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -636,6 +802,14 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(user.Email); } + /// + /// Returns the normalized email for the specified . + /// + /// The user whose email address to retrieve. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The task object containing the results of the asynchronous lookup operation, the normalized email address if any associated with the specified user. + /// public virtual Task GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -647,6 +821,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework return Task.FromResult(user.NormalizedEmail); } + /// + /// Sets the normalized email for the specified . + /// + /// The user whose email address to set. + /// The normalized email to set for the specified . + /// The used to propagate notifications that the operation should be canceled. + /// The task object representing the asynchronous operation. public virtual Task SetNormalizedEmailAsync(TUser user, string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -660,11 +841,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Find an user by email + /// Gets the user, if any, associated with the specified, normalized email address. /// - /// - /// - /// + /// The normalized email address to return the user for. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The task object containing the results of the asynchronous lookup operation, the user if any associated with the specified normalized email address. + /// public virtual Task FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -673,12 +856,15 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Returns the DateTimeOffset that represents the end of a user's lockout, any time in the past should be considered - /// not locked out. + /// Gets the last a user's last lockout expired, if any. + /// Any time in the past should be indicates a user is not locked out. /// - /// - /// - /// + /// The user whose lockout date should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// + /// A that represents the result of the asynchronous query, a containing the last time + /// a user's lockout expired, if any. + /// public virtual Task GetLockoutEndDateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -691,12 +877,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Locks a user out until the specified end date (set to a past date, to unlock a user) + /// Locks out a user until the specified end date has passed. Setting a end date in the past immediately unlocks a user. /// - /// - /// - /// - /// + /// The user whose lockout date should be set. + /// The after which the 's lockout should end. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -710,11 +896,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Used to record when an attempt to access the user has failed + /// Records that a failed access has occurred, incrementing the failed access count. /// - /// - /// - /// + /// The user whose cancellation count should be incremented. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the incremented failed access count. public virtual Task IncrementAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -728,11 +914,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Used to reset the account access count, typically after the account is successfully accessed + /// Resets a user's failed access count. /// - /// - /// - /// + /// The user whose failed access count should be reset. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. + /// This is typically called after the account is successfully accessed. public virtual Task ResetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -746,12 +933,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Returns the current number of failed access attempts. This number usually will be reset whenever the password is - /// verified or the account is locked out. + /// Retrieves the current failed access count for the specified .. /// - /// - /// - /// + /// The user whose failed access count should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the failed access count. public virtual Task GetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -764,11 +950,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Returns whether the user can be locked out. + /// Retrieves a flag indicating whether user lockout can enabled for the specified user. /// - /// - /// - /// + /// The user whose ability to be locked out should be returned. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The that represents the asynchronous operation, true if a user can be locked out, otherwise false. + /// public virtual Task GetLockoutEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -781,12 +969,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Sets whether the user can be locked out. + /// Set the flag indicating if the specified can be locked out.. /// - /// - /// - /// - /// + /// The user whose ability to be locked out should be set. + /// A flag indicating if lock out can be enabled for the specified . + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetLockoutEnabledAsync(TUser user, bool enabled, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -800,12 +988,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Set the user's phone number + /// Sets the telephone number for the specified . /// - /// - /// - /// - /// + /// The user whose telephone number should be set. + /// The telephone number to set. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetPhoneNumberAsync(TUser user, string phoneNumber, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -819,11 +1007,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Get a user's phone number + /// Gets the telephone number, if any, for the specified . /// - /// - /// - /// + /// The user whose telephone number should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the user's telephone number, if any. public virtual Task GetPhoneNumberAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -836,11 +1024,14 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Returns whether the user phoneNumber is confirmed + /// Gets a flag indicating whether the specified 's telephone number has been confirmed. /// - /// - /// - /// + /// The user to return a flag for, indicating whether their telephone number is confirmed. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The that represents the asynchronous operation, returning true if the specified has a confirmed + /// telephone number otherwise false. + /// public virtual Task GetPhoneNumberConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -853,12 +1044,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Set PhoneNumberConfirmed on the user + /// Sets a flag indicating if the specified 's phone number has been confirmed.. /// - /// - /// - /// - /// + /// The user whose telephone number confirmation status should be set. + /// A flag indicating whether the user's telephone number has been confirmed. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetPhoneNumberConfirmedAsync(TUser user, bool confirmed, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -872,12 +1063,12 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Set the security stamp for the user + /// Sets the provided security for the specified . /// - /// - /// - /// - /// + /// The user whose security stamp should be set. + /// The security stamp to set. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetSecurityStampAsync(TUser user, string stamp, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -891,11 +1082,11 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Get the security stamp for a user + /// Get the security stamp for the specified . /// - /// - /// - /// + /// The user whose security stamp should be set. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation, containing the security stamp for the specified . public virtual Task GetSecurityStampAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -908,12 +1099,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Set whether two factor authentication is enabled for the user + /// Sets a flag indicating whether the specified has two factor authentication enabled or not, + /// as an asynchronous operation. /// - /// - /// - /// - /// + /// The user whose two factor authentication enabled status should be set. + /// A flag indicating whether the specified has two factor authentication enabled. + /// The used to propagate notifications that the operation should be canceled. + /// The that represents the asynchronous operation. public virtual Task SetTwoFactorEnabledAsync(TUser user, bool enabled, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -927,11 +1119,15 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Gets whether two factor authentication is enabled for the user + /// Returns a flag indicating whether the specified has two factor authentication enabled or not, + /// as an asynchronous operation. /// - /// - /// - /// + /// The user whose two factor authentication enabled status should be set. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The that represents the asynchronous operation, containing a flag indicating whether the specified + /// has two factor authentication enabled or not. + /// public virtual Task GetTwoFactorEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -944,11 +1140,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Get all users with given claim + /// Retrieves all users with the specified claim. /// - /// - /// - /// + /// The claim whose users should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The contains a list of users, if any, that contain the specified claim. + /// public async virtual Task> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); @@ -968,11 +1166,13 @@ namespace Microsoft.AspNet.Identity.EntityFramework } /// - /// Get all users in given role + /// Retrieves all users in the specified role. /// - /// - /// - /// + /// The role whose users should be retrieved. + /// The used to propagate notifications that the operation should be canceled. + /// + /// The contains a list of users, if any, that are in the specified role. + /// public async virtual Task> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); diff --git a/src/Microsoft.AspNet.Identity/IUserEmailStore.cs b/src/Microsoft.AspNet.Identity/IUserEmailStore.cs index 5ac801a5d3..e5f54933d5 100644 --- a/src/Microsoft.AspNet.Identity/IUserEmailStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserEmailStore.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Identity public interface IUserEmailStore : IUserStore where TUser : class { /// - /// Sets the address for a , as an asynchronous operation. + /// Sets the address for a . /// /// The user whose email should be set. /// The email to set. @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Identity Task SetEmailAsync(TUser user, string email, CancellationToken cancellationToken); /// - /// Gets the email address for the specified , as an asynchronous operation. + /// Gets the email address for the specified . /// /// The user whose email should be returned. /// The used to propagate notifications that the operation should be canceled. @@ -31,7 +31,7 @@ namespace Microsoft.AspNet.Identity /// /// Gets a flag indicating whether the email address for the specified has been verified, true if the email address is verified otherwise - /// false, as an asynchronous operation. + /// false. /// /// The user whose email confirmation status should be returned. /// The used to propagate notifications that the operation should be canceled. @@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Identity Task GetEmailConfirmedAsync(TUser user, CancellationToken cancellationToken); /// - /// Sets the flag indicating whether the specified 's email address has been confirmed or not, as an asynchronous operation. + /// Sets the flag indicating whether the specified 's email address has been confirmed or not. /// /// The user whose email confirmation status should be set. /// A flag indicating if the email address has been confirmed, true if the address is confirmed otherwise false. @@ -51,7 +51,7 @@ namespace Microsoft.AspNet.Identity Task SetEmailConfirmedAsync(TUser user, bool confirmed, CancellationToken cancellationToken); /// - /// Gets the user, if any, associated with the specified, normalized email address, as an asynchronous operation. + /// Gets the user, if any, associated with the specified, normalized email address. /// /// The normalized email address to return the user for. /// The used to propagate notifications that the operation should be canceled. @@ -61,7 +61,7 @@ namespace Microsoft.AspNet.Identity Task FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken); /// - /// Returns the normalized email for the specified , as an asynchronous operation. + /// Returns the normalized email for the specified . /// /// The user whose email address to retrieve. /// The used to propagate notifications that the operation should be canceled. @@ -71,7 +71,7 @@ namespace Microsoft.AspNet.Identity Task GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken); /// - /// Sets the normalized email for the specified , as an asynchronous operation. + /// Sets the normalized email for the specified . /// /// The user whose email address to set. /// The normalized email to set for the specified . diff --git a/src/Microsoft.AspNet.Identity/IUserLockoutStore.cs b/src/Microsoft.AspNet.Identity/IUserLockoutStore.cs index b72ab31014..142cf77d71 100644 --- a/src/Microsoft.AspNet.Identity/IUserLockoutStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserLockoutStore.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Identity public interface IUserLockoutStore : IUserStore where TUser : class { /// - /// Gets the last a user's last lockout expired, if any, as an asynchronous operation. + /// Gets the last a user's last lockout expired, if any. /// Any time in the past should be indicates a user is not locked out. /// /// The user whose lockout date should be retrieved. @@ -27,7 +27,7 @@ namespace Microsoft.AspNet.Identity Task GetLockoutEndDateAsync(TUser user, CancellationToken cancellationToken); /// - /// Locks out a user until the specified end date has passed, as an asynchronous operation. Setting a end date in the past immediately unlocks a user. + /// Locks out a user until the specified end date has passed. Setting a end date in the past immediately unlocks a user. /// /// The user whose lockout date should be set. /// The after which the 's lockout should end. @@ -36,7 +36,7 @@ namespace Microsoft.AspNet.Identity Task SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd, CancellationToken cancellationToken); /// - /// Records that a failed access has occurred, incrementing the failed access count, as an asynchronous operation. + /// Records that a failed access has occurred, incrementing the failed access count. /// /// The user whose cancellation count should be incremented. /// The used to propagate notifications that the operation should be canceled. @@ -44,7 +44,7 @@ namespace Microsoft.AspNet.Identity Task IncrementAccessFailedCountAsync(TUser user, CancellationToken cancellationToken); /// - /// Resets a user's failed access count, as an asynchronous operation. + /// Resets a user's failed access count. /// /// The user whose failed access count should be reset. /// The used to propagate notifications that the operation should be canceled. @@ -53,7 +53,7 @@ namespace Microsoft.AspNet.Identity Task ResetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken); /// - /// Retrieves the current failed access count for the specified , as an asynchronous operation.. + /// Retrieves the current failed access count for the specified .. /// /// The user whose failed access count should be retrieved. /// The used to propagate notifications that the operation should be canceled. @@ -61,7 +61,7 @@ namespace Microsoft.AspNet.Identity Task GetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken); /// - /// Retrieves a flag indicating whether user lockout can enabled for the specified user, as an asynchronous operation. + /// Retrieves a flag indicating whether user lockout can enabled for the specified user. /// /// The user whose ability to be locked out should be returned. /// The used to propagate notifications that the operation should be canceled. @@ -71,7 +71,7 @@ namespace Microsoft.AspNet.Identity Task GetLockoutEnabledAsync(TUser user, CancellationToken cancellationToken); /// - /// Set the flag indicating if the specified can be locked out, as an asynchronous operation.. + /// Set the flag indicating if the specified can be locked out.. /// /// The user whose ability to be locked out should be set. /// A flag indicating if lock out can be enabled for the specified . diff --git a/src/Microsoft.AspNet.Identity/IUserLoginStore.cs b/src/Microsoft.AspNet.Identity/IUserLoginStore.cs index e6e6e32bdd..3af7270810 100644 --- a/src/Microsoft.AspNet.Identity/IUserLoginStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserLoginStore.cs @@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Identity public interface IUserLoginStore : IUserStore where TUser : class { /// - /// Adds an external to the specified , as an asynchronous operation. + /// Adds an external to the specified . /// /// The user to add the login to. /// The external to add to the specified . @@ -24,7 +24,7 @@ namespace Microsoft.AspNet.Identity Task AddLoginAsync(TUser user, UserLoginInfo login, CancellationToken cancellationToken); /// - /// Attempts to remove the provided login information from the specified , as an asynchronous operation. + /// Attempts to remove the provided login information from the specified . /// and returns a flag indicating whether the removal succeed or not. /// /// The user to remove the login information from. @@ -38,7 +38,7 @@ namespace Microsoft.AspNet.Identity Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey, CancellationToken cancellationToken); /// - /// Retrieves the associated logins for the specified , as an asynchronous operation. + /// Retrieves the associated logins for the specified . /// /// The user whose associated logins to retrieve. /// The used to propagate notifications that the operation should be canceled. @@ -48,7 +48,7 @@ namespace Microsoft.AspNet.Identity Task> GetLoginsAsync(TUser user, CancellationToken cancellationToken); /// - /// Retrieves the user associated with the specified login provider and login provider key, as an asynchronous operation.. + /// Retrieves the user associated with the specified login provider and login provider key.. /// /// The login provider who provided the . /// The key provided by the to identify a user. diff --git a/src/Microsoft.AspNet.Identity/IUserPasswordStore.cs b/src/Microsoft.AspNet.Identity/IUserPasswordStore.cs index 087b7c56eb..f2e3dfc74a 100644 --- a/src/Microsoft.AspNet.Identity/IUserPasswordStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserPasswordStore.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Identity public interface IUserPasswordStore : IUserStore where TUser : class { /// - /// Sets the password hash for the specified , as an asynchronous operation. + /// Sets the password hash for the specified . /// /// The user whose password hash to set. /// The password hash to set. @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Identity Task SetPasswordHashAsync(TUser user, string passwordHash, CancellationToken cancellationToken); /// - /// Gets the password hash for the specified , as an asynchronous operation. + /// Gets the password hash for the specified . /// /// The user whose password hash to retrieve. /// The used to propagate notifications that the operation should be canceled. @@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Identity Task GetPasswordHashAsync(TUser user, CancellationToken cancellationToken); /// - /// Gets a flag indicating whether the specified has a password, as an asynchronous operation. + /// Gets a flag indicating whether the specified has a password. /// /// The user to return a flag for, indicating whether they have a password or not. /// The used to propagate notifications that the operation should be canceled. diff --git a/src/Microsoft.AspNet.Identity/IUserPhoneNumberStore.cs b/src/Microsoft.AspNet.Identity/IUserPhoneNumberStore.cs index 5a5403a3df..efcc7a8380 100644 --- a/src/Microsoft.AspNet.Identity/IUserPhoneNumberStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserPhoneNumberStore.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Identity public interface IUserPhoneNumberStore : IUserStore where TUser : class { /// - /// Sets the telephone number for the specified , as an asynchronous operation. + /// Sets the telephone number for the specified . /// /// The user whose telephone number should be set. /// The telephone number to set. @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Identity Task SetPhoneNumberAsync(TUser user, string phoneNumber, CancellationToken cancellationToken); /// - /// Gets the telephone number, if any, for the specified , as an asynchronous operation. + /// Gets the telephone number, if any, for the specified . /// /// The user whose telephone number should be retrieved. /// The used to propagate notifications that the operation should be canceled. @@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Identity Task GetPhoneNumberAsync(TUser user, CancellationToken cancellationToken); /// - /// Gets a flag indicating whether the specified 's telephone number has been confirmed, as an asynchronous operation. + /// Gets a flag indicating whether the specified 's telephone number has been confirmed. /// /// The user to return a flag for, indicating whether their telephone number is confirmed. /// The used to propagate notifications that the operation should be canceled. @@ -41,7 +41,7 @@ namespace Microsoft.AspNet.Identity Task GetPhoneNumberConfirmedAsync(TUser user, CancellationToken cancellationToken); /// - /// Sets a flag indicating if the specified 's phone number has been confirmed, as an asynchronous operation.. + /// Sets a flag indicating if the specified 's phone number has been confirmed.. /// /// The user whose telephone number confirmation status should be set. /// A flag indicating whether the user's telephone number has been confirmed. diff --git a/src/Microsoft.AspNet.Identity/IUserRoleStore.cs b/src/Microsoft.AspNet.Identity/IUserRoleStore.cs index 32ac944b41..963bf44519 100644 --- a/src/Microsoft.AspNet.Identity/IUserRoleStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserRoleStore.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Identity public interface IUserRoleStore : IUserStore where TUser : class { /// - /// Add a the specified to the named role, as an asynchronous operation. + /// Add a the specified to the named role. /// /// The user to add to the named role. /// The name of the role to add the user to. @@ -23,7 +23,7 @@ namespace Microsoft.AspNet.Identity Task AddToRoleAsync(TUser user, string roleName, CancellationToken cancellationToken); /// - /// Add a the specified from the named role, as an asynchronous operation. + /// Add a the specified from the named role. /// /// The user to remove the named role from. /// The name of the role to remove. @@ -32,7 +32,7 @@ namespace Microsoft.AspNet.Identity Task RemoveFromRoleAsync(TUser user, string roleName, CancellationToken cancellationToken); /// - /// Gets a list of role names the specified belongs to, as an asynchronous operation. + /// Gets a list of role names the specified belongs to. /// /// The user whose role names to retrieve. /// The used to propagate notifications that the operation should be canceled. @@ -40,7 +40,7 @@ namespace Microsoft.AspNet.Identity Task> GetRolesAsync(TUser user, CancellationToken cancellationToken); /// - /// Returns a flag indicating whether the specified is a member of the give named role, as an asynchronous operation. + /// Returns a flag indicating whether the specified is a member of the give named role. /// /// The user whose role membership should be checked. /// The name of the role to be checked. diff --git a/src/Microsoft.AspNet.Identity/IUserSecurityStampStore.cs b/src/Microsoft.AspNet.Identity/IUserSecurityStampStore.cs index b66a4a5ca4..b210bede5d 100644 --- a/src/Microsoft.AspNet.Identity/IUserSecurityStampStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserSecurityStampStore.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Identity public interface IUserSecurityStampStore : IUserStore where TUser : class { /// - /// Sets the provided security for the specified , as an asynchronous operation. + /// Sets the provided security for the specified . /// /// The user whose security stamp should be set. /// The security stamp to set. @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Identity Task SetSecurityStampAsync(TUser user, string stamp, CancellationToken cancellationToken); /// - /// Get the security stamp for the specified , as an asynchronous operation. + /// Get the security stamp for the specified . /// /// The user whose security stamp should be set. /// The used to propagate notifications that the operation should be canceled. diff --git a/src/Microsoft.AspNet.Identity/IUserStore.cs b/src/Microsoft.AspNet.Identity/IUserStore.cs index 605f32dd16..4944bbe331 100644 --- a/src/Microsoft.AspNet.Identity/IUserStore.cs +++ b/src/Microsoft.AspNet.Identity/IUserStore.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Identity public interface IUserStore : IDisposable where TUser : class { /// - /// Gets the user identifier for the specified , as an asynchronous operation. + /// Gets the user identifier for the specified . /// /// The user whose identifier should be retrieved. /// The used to propagate notifications that the operation should be canceled. @@ -22,7 +22,7 @@ namespace Microsoft.AspNet.Identity Task GetUserIdAsync(TUser user, CancellationToken cancellationToken); /// - /// Gets the user name for the specified , as an asynchronous operation. + /// Gets the user name for the specified . /// /// The user whose name should be retrieved. /// The used to propagate notifications that the operation should be canceled. @@ -30,7 +30,7 @@ namespace Microsoft.AspNet.Identity Task GetUserNameAsync(TUser user, CancellationToken cancellationToken); /// - /// Sets the given for the specified , as an asynchronous operation. + /// Sets the given for the specified . /// /// The user whose name should be set. /// The user name to set. @@ -39,7 +39,7 @@ namespace Microsoft.AspNet.Identity Task SetUserNameAsync(TUser user, string userName, CancellationToken cancellationToken); /// - /// Gets the normalized user name for the specified , as an asynchronous operation. + /// Gets the normalized user name for the specified . /// /// The user whose normalized name should be retrieved. /// The used to propagate notifications that the operation should be canceled. @@ -47,7 +47,7 @@ namespace Microsoft.AspNet.Identity Task GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken); /// - /// Sets the given normalized name for the specified , as an asynchronous operation. + /// Sets the given normalized name for the specified . /// /// The user whose name should be set. /// The normalized name to set. @@ -56,7 +56,7 @@ namespace Microsoft.AspNet.Identity Task SetNormalizedUserNameAsync(TUser user, string normalizedName, CancellationToken cancellationToken); /// - /// Creates the specified in the user store, as an asynchronous operation. + /// Creates the specified in the user store. /// /// The user to create. /// The used to propagate notifications that the operation should be canceled. @@ -64,7 +64,7 @@ namespace Microsoft.AspNet.Identity Task CreateAsync(TUser user, CancellationToken cancellationToken); /// - /// Updates the specified in the user store, as an asynchronous operation. + /// Updates the specified in the user store. /// /// The user to update. /// The used to propagate notifications that the operation should be canceled. @@ -72,7 +72,7 @@ namespace Microsoft.AspNet.Identity Task UpdateAsync(TUser user, CancellationToken cancellationToken); /// - /// Deletes the specified from the user store, as an asynchronous operation. + /// Deletes the specified from the user store. /// /// The user to delete. /// The used to propagate notifications that the operation should be canceled. diff --git a/src/Microsoft.AspNet.Identity/IUserTokenProvider.cs b/src/Microsoft.AspNet.Identity/IUserTokenProvider.cs index 96d9b5fec4..417ef98022 100644 --- a/src/Microsoft.AspNet.Identity/IUserTokenProvider.cs +++ b/src/Microsoft.AspNet.Identity/IUserTokenProvider.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Identity public interface IUserTokenProvider where TUser : class { /// - /// Generates a token for the specified and , as an asynchronous operation. + /// Generates a token for the specified and . /// /// The purpose the token will be used for. /// The that can be used to retrieve user properties. @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Identity /// /// Returns a flag indicating whether the specified is valid for the given - /// and , as an asynchronous operation. + /// and . /// /// The purpose the token will be used for. /// The token to validate. diff --git a/src/Microsoft.AspNet.Identity/IdentityBuilder.cs b/src/Microsoft.AspNet.Identity/IdentityBuilder.cs index 75968afe38..8de799249d 100644 --- a/src/Microsoft.AspNet.Identity/IdentityBuilder.cs +++ b/src/Microsoft.AspNet.Identity/IdentityBuilder.cs @@ -60,7 +60,7 @@ namespace Microsoft.AspNet.Identity /// Adds an for the . /// /// The user type to validate. - /// The . + /// The current instance. public virtual IdentityBuilder AddUserValidator() where T : class { return AddScoped(typeof(IUserValidator<>).MakeGenericType(UserType), typeof(T)); @@ -70,7 +70,7 @@ namespace Microsoft.AspNet.Identity /// Adds an for the . /// /// The role type to validate. - /// The . + /// The current instance. public virtual IdentityBuilder AddRoleValidator() where T : class { return AddScoped(typeof(IRoleValidator<>).MakeGenericType(RoleType), typeof(T)); @@ -80,7 +80,7 @@ namespace Microsoft.AspNet.Identity /// Adds an . /// /// The type of the error describer. - /// The . + /// The current instance. public virtual IdentityBuilder AddErrorDescriber() where TDescriber : IdentityErrorDescriber { Services.AddScoped(); @@ -91,7 +91,7 @@ namespace Microsoft.AspNet.Identity /// Adds an for the . /// /// The user type whose password will be validated. - /// The . + /// The current instance. public virtual IdentityBuilder AddPasswordValidator() where T : class { return AddScoped(typeof(IPasswordValidator<>).MakeGenericType(UserType), typeof(T)); @@ -101,7 +101,7 @@ namespace Microsoft.AspNet.Identity /// Adds an for the . /// /// The user type whose password will be validated. - /// The . + /// The current instance. public virtual IdentityBuilder AddUserStore() where T : class { return AddScoped(typeof(IUserStore<>).MakeGenericType(UserType), typeof(T)); @@ -111,7 +111,7 @@ namespace Microsoft.AspNet.Identity /// Adds a for the . /// /// The role type held in the store. - /// The . + /// The current instance. public virtual IdentityBuilder AddRoleStore() where T : class { return AddScoped(typeof(IRoleStore<>).MakeGenericType(RoleType), typeof(T)); @@ -122,7 +122,7 @@ namespace Microsoft.AspNet.Identity /// /// The type of the token provider to add. /// The name of the provider to add. - /// The . + /// The current instance. public virtual IdentityBuilder AddTokenProvider(string providerName) where TProvider : class { return AddTokenProvider(providerName, typeof(TProvider)); @@ -133,7 +133,7 @@ namespace Microsoft.AspNet.Identity /// /// The name of the provider to add. /// The type of the to add. - /// The . + /// The current instance. public virtual IdentityBuilder AddTokenProvider(string providerName, Type provider) { if (!typeof(IUserTokenProvider<>).MakeGenericType(UserType).GetTypeInfo().IsAssignableFrom(provider.GetTypeInfo())) @@ -149,9 +149,10 @@ namespace Microsoft.AspNet.Identity } /// - /// Adds the default token providers. + /// Adds the default token providers used to generate tokens for reset passwords, change email + /// and change telephone number operations, and for two factor authentication token generation. /// - /// The . + /// The current instance. public virtual IdentityBuilder AddDefaultTokenProviders() { var dataProtectionProviderType = typeof(DataProtectorTokenProvider<>).MakeGenericType(UserType); @@ -166,7 +167,7 @@ namespace Microsoft.AspNet.Identity /// Adds a for the . /// /// The type of the user manager to add. - /// The . + /// The current instance. public virtual IdentityBuilder AddUserManager() where TUserManager : class { var userManagerType = typeof(UserManager<>).MakeGenericType(UserType); @@ -184,7 +185,7 @@ namespace Microsoft.AspNet.Identity /// Adds a for the . /// /// The type of the role manager to add. - /// The . + /// The current instance. public virtual IdentityBuilder AddRoleManager() where TRoleManager : class { var managerType = typeof(RoleManager<>).MakeGenericType(RoleType); diff --git a/src/Microsoft.AspNet.Identity/PhoneNumberTokenProvider.cs b/src/Microsoft.AspNet.Identity/PhoneNumberTokenProvider.cs index a97f1c965a..2c53d0b634 100644 --- a/src/Microsoft.AspNet.Identity/PhoneNumberTokenProvider.cs +++ b/src/Microsoft.AspNet.Identity/PhoneNumberTokenProvider.cs @@ -34,7 +34,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Returns a constant, provider and user unique modifier used for entropy in generated tokens from user information, as an asynchronous operation. + /// Returns a constant, provider and user unique modifier used for entropy in generated tokens from user information. /// /// The purpose the token will be generated for. /// The that can be used to retrieve user properties. diff --git a/src/Microsoft.AspNet.Identity/RoleManager.cs b/src/Microsoft.AspNet.Identity/RoleManager.cs index 8b0ac3a8e4..d367c0d57c 100644 --- a/src/Microsoft.AspNet.Identity/RoleManager.cs +++ b/src/Microsoft.AspNet.Identity/RoleManager.cs @@ -149,7 +149,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Creates the specified in the persistence store, as an asynchronous operation. + /// Creates the specified in the persistence store. /// /// The role to create. /// @@ -173,7 +173,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Updates the normalized name for the specified , as an asynchronous operation. + /// Updates the normalized name for the specified . /// /// The role whose normalized name needs to be updated. /// @@ -186,7 +186,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Updates the specified , as an asynchronous operation. + /// Updates the specified . /// /// The role to updated. /// @@ -204,7 +204,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Deletes the specified , as an asynchronous operation. + /// Deletes the specified . /// /// The role to delete. /// @@ -222,7 +222,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets a flag indicating whether the specified exists, as an asynchronous operation. + /// Gets a flag indicating whether the specified exists. /// /// The role name whose existence should be checked. /// @@ -250,7 +250,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Finds the role associated with the specified if any, as an asynchronous operation. + /// Finds the role associated with the specified if any. /// /// The role ID whose role should be returned. /// @@ -264,7 +264,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets the name of the specified , as an asynchronous operation. + /// Gets the name of the specified . /// /// The role whose name should be retrieved. /// @@ -278,7 +278,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Sets the name of the specified , as an asynchronous operation. + /// Sets the name of the specified . /// /// The role whose name should be set. /// The name to set. @@ -296,7 +296,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets the ID of the specified , as an asynchronous operation. + /// Gets the ID of the specified . /// /// The role whose ID should be retrieved. /// @@ -310,7 +310,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Finds the role associated with the specified if any, as an asynchronous operation. + /// Finds the role associated with the specified if any. /// /// The name of the role to be returned. /// @@ -329,7 +329,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Adds a claim to a role, as an asynchronous operation. + /// Adds a claim to a role. /// /// The role to add the claim to. /// The claim to add. @@ -355,7 +355,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Removes a claim from a role, as an asynchronous operation. + /// Removes a claim from a role. /// /// The role to remove the claim from. /// The claim to add. @@ -377,7 +377,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets a list of claims associated with the specified , as an asynchronous operation. + /// Gets a list of claims associated with the specified . /// /// The role whose claims should be returned. /// diff --git a/src/Microsoft.AspNet.Identity/TotpSecurityStampBasedTokenProvider.cs b/src/Microsoft.AspNet.Identity/TotpSecurityStampBasedTokenProvider.cs index 5487080832..d1591f33fa 100644 --- a/src/Microsoft.AspNet.Identity/TotpSecurityStampBasedTokenProvider.cs +++ b/src/Microsoft.AspNet.Identity/TotpSecurityStampBasedTokenProvider.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Identity where TUser : class { /// - /// Generates a token for the specified and , as an asynchronous operation. + /// Generates a token for the specified and . /// /// The purpose the token will be used for. /// The that can be used to retrieve user properties. @@ -44,7 +44,7 @@ namespace Microsoft.AspNet.Identity /// /// Returns a flag indicating whether the specified is valid for the given - /// and , as an asynchronous operation. + /// and . /// /// The purpose the token will be used for. /// The token to validate. @@ -72,7 +72,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Returns a constant, provider and user unique modifier used for entropy in generated tokens from user information, as an asynchronous operation. + /// Returns a constant, provider and user unique modifier used for entropy in generated tokens from user information. /// /// The purpose the token will be generated for. /// The that can be used to retrieve user properties. diff --git a/src/Microsoft.AspNet.Identity/UserManager.cs b/src/Microsoft.AspNet.Identity/UserManager.cs index fc88f338c6..6d68b0b25d 100644 --- a/src/Microsoft.AspNet.Identity/UserManager.cs +++ b/src/Microsoft.AspNet.Identity/UserManager.cs @@ -301,7 +301,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Generates a value suitable for use in concurrency tracking, as an asynchronous operation. + /// Generates a value suitable for use in concurrency tracking. /// /// The user to generate the stamp for. /// @@ -342,7 +342,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Updates the specified in the backing store, as an asynchronous operation. + /// Updates the specified in the backing store. /// /// The user to update. /// @@ -361,7 +361,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Deletes the specified from the backing store, as an asynchronous operation. + /// Deletes the specified from the backing store. /// /// The user to delete. /// @@ -453,7 +453,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Updates the normalized user name for the specified , as an asynchronous operation. + /// Updates the normalized user name for the specified . /// /// The user whose user name should be normalized and updated. /// The that represents the asynchronous operation. @@ -464,7 +464,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets the user name for the specified , as an asynchronous operation. + /// Gets the user name for the specified . /// /// The user whose name should be retrieved. /// The that represents the asynchronous operation, containing the name for the specified . @@ -479,7 +479,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Sets the given for the specified , as an asynchronous operation. + /// Sets the given for the specified . /// /// The user whose name should be set. /// The user name to set. @@ -498,7 +498,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets the user identifier for the specified , as an asynchronous operation. + /// Gets the user identifier for the specified . /// /// The user whose identifier should be retrieved. /// The that represents the asynchronous operation, containing the identifier for the specified . @@ -510,7 +510,7 @@ namespace Microsoft.AspNet.Identity /// /// Returns a flag indicating whether the given is valid for the - /// specified , as an asynchronous operation. + /// specified . /// /// The user whose password should be validated. /// The password to validate @@ -542,7 +542,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets a flag indicating whether the specified has a password, as an asynchronous operation. + /// Gets a flag indicating whether the specified has a password. /// /// The user to return a flag for, indicating whether they have a password or not. /// @@ -563,7 +563,7 @@ namespace Microsoft.AspNet.Identity /// /// Adds the to the specified only if the user - /// does not already have a password, as an asynchronous operation. + /// does not already have a password. /// /// The user whose password should be set. /// The password to set. @@ -629,7 +629,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Removes a user's password, as an asynchronous operation. + /// Removes a user's password. /// /// The user whose password should be removed. /// The used to propagate notifications that the operation should be canceled. @@ -672,7 +672,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Get the security stamp for the specified , as an asynchronous operation. + /// Get the security stamp for the specified . /// /// The user whose security stamp should be set. /// The that represents the asynchronous operation, containing the security stamp for the specified . @@ -688,7 +688,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Regenerates the security stamp for the specified , as an asynchronous operation. + /// Regenerates the security stamp for the specified . /// /// The user whose security stamp should be regenerated. /// @@ -713,7 +713,7 @@ namespace Microsoft.AspNet.Identity /// /// Generates a password reset token for the specified , using - /// the configured password reset token provider, as an asynchronous operation. + /// the configured password reset token provider. /// /// The user to generate a password reset token for. /// The that represents the asynchronous operation, @@ -726,7 +726,7 @@ namespace Microsoft.AspNet.Identity /// /// Resets the 's password to the specified after - /// validating the given password reset , as an asynchronous operation. + /// validating the given password reset . /// /// The user whose password should be reset. /// The password reset token to verify. @@ -758,7 +758,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Retrieves the user associated with the specified external login provider and login provider key, as an asynchronous operation.. + /// Retrieves the user associated with the specified external login provider and login provider key.. /// /// The login provider who provided the . /// The key provided by the to identify a user. @@ -781,7 +781,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Attempts to remove the provided external login information from the specified , as an asynchronous operation. + /// Attempts to remove the provided external login information from the specified . /// and returns a flag indicating whether the removal succeed or not. /// /// The user to remove the login information from. @@ -814,7 +814,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Adds an external to the specified , as an asynchronous operation. + /// Adds an external to the specified . /// /// The user to add the login to. /// The external to add to the specified . @@ -846,7 +846,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Retrieves the associated logins for the specified , as an asynchronous operation. + /// Retrieves the associated logins for the specified . /// /// The user whose associated logins to retrieve. /// @@ -864,7 +864,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Adds the specified to the , as an asynchronous operation. + /// Adds the specified to the . /// /// The user to add the claim to. /// The claim to add. @@ -888,7 +888,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Adds the specified to the , as an asynchronous operation. + /// Adds the specified to the . /// /// The user to add the claim to. /// The claims to add. @@ -1014,7 +1014,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Add the specified to the named role, as an asynchronous operation. + /// Add the specified to the named role. /// /// The user to add to the named role. /// The name of the role to add the user to. @@ -1040,7 +1040,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Add the specified to the named roles, as an asynchronous operation. + /// Add the specified to the named roles. /// /// The user to add to the named roles. /// The name of the roles to add the user to. @@ -1073,7 +1073,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Removes the specified from the named role, as an asynchronous operation. + /// Removes the specified from the named role. /// /// The user to remove from the named role. /// The name of the role to remove the user from. @@ -1111,7 +1111,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Removes the specified from the named roles, as an asynchronous operation. + /// Removes the specified from the named roles. /// /// The user to remove from the named roles. /// The name of the roles to remove the user from. @@ -1144,7 +1144,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets a list of role names the specified belongs to, as an asynchronous operation. + /// Gets a list of role names the specified belongs to. /// /// The user whose role names to retrieve. /// The that represents the asynchronous operation, containing a list of role names. @@ -1160,7 +1160,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Returns a flag indicating whether the specified is a member of the give named role, as an asynchronous operation. + /// Returns a flag indicating whether the specified is a member of the give named role. /// /// The user whose role membership should be checked. /// The name of the role to be checked. @@ -1180,7 +1180,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets the email address for the specified , as an asynchronous operation. + /// Gets the email address for the specified . /// /// The user whose email should be returned. /// The used to propagate notifications that the operation should be canceled. @@ -1197,7 +1197,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Sets the address for a , as an asynchronous operation. + /// Sets the address for a . /// /// The user whose email should be set. /// The email to set. @@ -1255,7 +1255,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Generates an email confirmation token for the specified user, as an asynchronous operation. + /// Generates an email confirmation token for the specified user. /// /// The user to generate an email confirmation token for. /// @@ -1268,7 +1268,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Validates that an email confirmation token matches the specified , as an asynchronous operation. + /// Validates that an email confirmation token matches the specified . /// /// The user to validate the token against. /// The email confirmation token to validate. @@ -1295,7 +1295,7 @@ namespace Microsoft.AspNet.Identity /// /// Gets a flag indicating whether the email address for the specified has been verified, true if the email address is verified otherwise - /// false, as an asynchronous operation. + /// false. /// /// The user whose email confirmation status should be returned. /// @@ -1314,7 +1314,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Generates an email change token for the specified user, as an asynchronous operation. + /// Generates an email change token for the specified user. /// /// The user to generate an email change token for. /// @@ -1357,7 +1357,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets the telephone number, if any, for the specified , as an asynchronous operation. + /// Gets the telephone number, if any, for the specified . /// /// The user whose telephone number should be retrieved. /// The that represents the asynchronous operation, containing the user's telephone number, if any. @@ -1428,7 +1428,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets a flag indicating whether the specified 's telephone number has been confirmed, as an asynchronous operation. + /// Gets a flag indicating whether the specified 's telephone number has been confirmed. /// /// The user to return a flag for, indicating whether their telephone number is confirmed. /// @@ -1447,7 +1447,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Generates a telephone number change token for the specified user, as an asynchronous operation. + /// Generates a telephone number change token for the specified user. /// /// The user to generate a telephone number token for. /// The new phone number the validation token should be sent to. @@ -1464,7 +1464,7 @@ namespace Microsoft.AspNet.Identity /// /// Returns a flag indicating whether the specified 's phone number change verification - /// token is valid for the given , as an asynchronous operation. + /// token is valid for the given . /// /// The user to validate the token against. /// The telephone number change token to validate. @@ -1492,7 +1492,7 @@ namespace Microsoft.AspNet.Identity /// /// Returns a flag indicating whether the specified is valid for - /// the given and , as an asynchronous operation. + /// the given and . /// /// The user to validate the token against. /// The token provider used to generate the token. @@ -1529,7 +1529,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Generates a token for the given and , as an asynchronous operation. + /// Generates a token for the given and . /// /// The purpose the token will be for. /// The user the token will be for. @@ -1600,7 +1600,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Verifies the specified two factor authentication against the , as an asynchronous operation. + /// Verifies the specified two factor authentication against the . /// /// The user the token is supposed to be for. /// The provider which will verify the token. @@ -1632,7 +1632,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets a two factor authentication token for the specified , as an asynchronous operation. + /// Gets a two factor authentication token for the specified . /// /// The user the token is for. /// The provider which will generate the token. @@ -1746,7 +1746,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Retrieves a flag indicating whether user lockout can enabled for the specified user, as an asynchronous operation. + /// Retrieves a flag indicating whether user lockout can enabled for the specified user. /// /// The user whose ability to be locked out should be returned. /// @@ -1764,7 +1764,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Gets the last a user's last lockout expired, if any, as an asynchronous operation. + /// Gets the last a user's last lockout expired, if any. /// Any time in the past should be indicates a user is not locked out. /// /// The user whose lockout date should be retrieved. @@ -1783,7 +1783,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Locks out a user until the specified end date has passed, as an asynchronous operation. Setting a end date in the past immediately unlocks a user. + /// Locks out a user until the specified end date has passed. Setting a end date in the past immediately unlocks a user. /// /// The user whose lockout date should be set. /// The after which the 's lockout should end. @@ -1836,7 +1836,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Resets the access failed count for the specified , as an asynchronous operation. + /// Resets the access failed count for the specified . /// /// The user whose failed access count should be reset. /// The that represents the asynchronous operation, containing the of the operation. @@ -1858,7 +1858,7 @@ namespace Microsoft.AspNet.Identity } /// - /// Retrieves the current number of failed accesses for the given , as an asynchronous operation. + /// Retrieves the current number of failed accesses for the given . /// /// The user whose access failed count should be retrieved for. /// The that contains the result the asynchronous operation, the current failed access count