diff --git a/Identity.sln b/Identity.sln
index 02d0353edc..8c276944ae 100644
--- a/Identity.sln
+++ b/Identity.sln
@@ -54,6 +54,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Identi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Identity.Service.InMemory.Test", "test\Microsoft.AspNetCore.Identity.Service.InMemory.Test\Microsoft.AspNetCore.Identity.Service.InMemory.Test.csproj", "{94EC586A-2AE6-4AF2-894A-B0973C65BD68}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Identity.Core", "src\Microsoft.Extensions.Identity.Core\Microsoft.Extensions.Identity.Core.csproj", "{D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Identity.Stores", "src\Microsoft.Extensions.Identity.Stores\Microsoft.Extensions.Identity.Stores.csproj", "{FADA11FC-DC06-4832-A569-7B2374A6CD42}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -326,6 +330,30 @@ Global
{94EC586A-2AE6-4AF2-894A-B0973C65BD68}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{94EC586A-2AE6-4AF2-894A-B0973C65BD68}.Release|x86.ActiveCfg = Release|Any CPU
{94EC586A-2AE6-4AF2-894A-B0973C65BD68}.Release|x86.Build.0 = Release|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Debug|x86.Build.0 = Debug|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Release|x86.ActiveCfg = Release|Any CPU
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}.Release|x86.Build.0 = Release|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Debug|x86.Build.0 = Debug|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Release|x86.ActiveCfg = Release|Any CPU
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -354,5 +382,7 @@ Global
{7423EB30-FFE9-4707-A44B-571E89A7CA15} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E}
{4F5D777E-3CFA-4EDF-BA89-4FE04BBF7A66} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E}
{94EC586A-2AE6-4AF2-894A-B0973C65BD68} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E}
+ {D5905D78-A32E-44B8-8F21-EDAEDC95D9B8} = {0F647068-6602-4E24-B1DC-8ED91481A50A}
+ {FADA11FC-DC06-4832-A569-7B2374A6CD42} = {0F647068-6602-4E24-B1DC-8ED91481A50A}
EndGlobalSection
EndGlobal
diff --git a/samples/IdentitySample.Mvc/Controllers/AccountController.cs b/samples/IdentitySample.Mvc/Controllers/AccountController.cs
index 78188a9e29..ca996ea292 100644
--- a/samples/IdentitySample.Mvc/Controllers/AccountController.cs
+++ b/samples/IdentitySample.Mvc/Controllers/AccountController.cs
@@ -1,17 +1,14 @@
-using System;
-using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
+using IdentitySample.Models;
+using IdentitySample.Models.AccountViewModels;
+using IdentitySample.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
-using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
-using IdentitySample.Models;
-using IdentitySample.Models.AccountViewModels;
-using IdentitySample.Services;
namespace IdentitySample.Controllers
{
diff --git a/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj b/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj
index a7060d0952..f4601bf543 100644
--- a/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj
+++ b/samples/IdentitySample.Mvc/IdentitySample.Mvc.csproj
@@ -9,12 +9,10 @@
-
-
diff --git a/samples/IdentitySample.Mvc/Models/ApplicationUser.cs b/samples/IdentitySample.Mvc/Models/ApplicationUser.cs
index 28be309e48..1034780fdf 100644
--- a/samples/IdentitySample.Mvc/Models/ApplicationUser.cs
+++ b/samples/IdentitySample.Mvc/Models/ApplicationUser.cs
@@ -2,7 +2,7 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
-using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
+using Microsoft.AspNetCore.Identity;
namespace IdentitySample.Models
{
diff --git a/samples/IdentitySample.Mvc/Models/ManageViewModels/IndexViewModel.cs b/samples/IdentitySample.Mvc/Models/ManageViewModels/IndexViewModel.cs
index cc874ae833..e8967b459e 100644
--- a/samples/IdentitySample.Mvc/Models/ManageViewModels/IndexViewModel.cs
+++ b/samples/IdentitySample.Mvc/Models/ManageViewModels/IndexViewModel.cs
@@ -1,7 +1,4 @@
-using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
namespace IdentitySample.Models.ManageViewModels
diff --git a/samples/IdentitySample.Mvc/Startup.cs b/samples/IdentitySample.Mvc/Startup.cs
index 9b63d0ecbe..24e657848e 100644
--- a/samples/IdentitySample.Mvc/Startup.cs
+++ b/samples/IdentitySample.Mvc/Startup.cs
@@ -2,6 +2,7 @@ using IdentitySample.Models;
using IdentitySample.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs
index 2a409a4820..2fafc38694 100644
--- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs
+++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs
@@ -15,14 +15,12 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// Initializes a new instance of .
///
/// The options to be used by a .
- public IdentityDbContext(DbContextOptions options) : base(options)
- { }
+ public IdentityDbContext(DbContextOptions options) : base(options) { }
///
/// Initializes a new instance of the class.
///
- protected IdentityDbContext()
- { }
+ protected IdentityDbContext() { }
}
///
@@ -35,14 +33,12 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// Initializes a new instance of .
///
/// The options to be used by a .
- public IdentityDbContext(DbContextOptions options) : base(options)
- { }
+ public IdentityDbContext(DbContextOptions options) : base(options) { }
///
/// Initializes a new instance of the class.
///
- protected IdentityDbContext()
- { }
+ protected IdentityDbContext() { }
}
///
@@ -57,17 +53,15 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
where TKey : IEquatable
{
///
- /// Initializes a new instance of .
+ /// Initializes a new instance of the db context.
///
/// The options to be used by a .
- public IdentityDbContext(DbContextOptions options) : base(options)
- { }
+ public IdentityDbContext(DbContextOptions options) : base(options) { }
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- protected IdentityDbContext()
- { }
+ protected IdentityDbContext() { }
}
///
@@ -92,17 +86,15 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
where TUserToken : IdentityUserToken
{
///
- /// Initializes a new instance of .
+ /// Initializes a new instance of the class.
///
/// The options to be used by a .
- public IdentityDbContext(DbContextOptions options) : base(options)
- { }
+ public IdentityDbContext(DbContextOptions options) : base(options) { }
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
- protected IdentityDbContext()
- { }
+ protected IdentityDbContext() { }
///
/// Gets or sets the of Users.
@@ -159,10 +151,12 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
b.Property(u => u.NormalizedUserName).HasMaxLength(256);
b.Property(u => u.Email).HasMaxLength(256);
b.Property(u => u.NormalizedEmail).HasMaxLength(256);
- b.HasMany(u => u.Claims).WithOne().HasForeignKey(uc => uc.UserId).IsRequired();
- b.HasMany(u => u.Logins).WithOne().HasForeignKey(ul => ul.UserId).IsRequired();
- b.HasMany(u => u.Roles).WithOne().HasForeignKey(ur => ur.UserId).IsRequired();
- b.HasMany(u => u.Tokens).WithOne().HasForeignKey(ut => ut.UserId).IsRequired();
+
+ // Replace with b.HasMany().
+ b.HasMany().WithOne().HasForeignKey(uc => uc.UserId).IsRequired();
+ b.HasMany().WithOne().HasForeignKey(ul => ul.UserId).IsRequired();
+ b.HasMany().WithOne().HasForeignKey(ur => ur.UserId).IsRequired();
+ b.HasMany().WithOne().HasForeignKey(ut => ut.UserId).IsRequired();
});
builder.Entity(b =>
@@ -175,8 +169,8 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
b.Property(u => u.Name).HasMaxLength(256);
b.Property(u => u.NormalizedName).HasMaxLength(256);
- b.HasMany(r => r.Users).WithOne().HasForeignKey(ur => ur.RoleId).IsRequired();
- b.HasMany(r => r.Claims).WithOne().HasForeignKey(rc => rc.RoleId).IsRequired();
+ b.HasMany().WithOne().HasForeignKey(ur => ur.RoleId).IsRequired();
+ b.HasMany().WithOne().HasForeignKey(rc => rc.RoleId).IsRequired();
});
builder.Entity(b =>
diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj
index b81a8114cd..a76627f45a 100644
--- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj
+++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj
@@ -11,6 +11,7 @@
+
diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/UserStore.cs b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/UserStore.cs
index 5899ab71a1..35135ec080 100644
--- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/UserStore.cs
+++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/UserStore.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Security.Claims;
@@ -96,6 +95,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// The type representing a user token.
/// The type representing a role claim.
public class UserStore :
+ UserStoreBase,
IUserLoginStore,
IUserRoleStore,
IUserClaimStore,
@@ -120,32 +120,24 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
where TRoleClaim : IdentityRoleClaim, new()
{
///
- /// Creates a new instance of .
+ /// Creates a new instance of the store.
///
/// The context used to access the store.
/// The used to describe store errors.
- public UserStore(TContext context, IdentityErrorDescriber describer = null)
+ public UserStore(TContext context, IdentityErrorDescriber describer = null) : base(describer ?? new IdentityErrorDescriber())
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
Context = context;
- ErrorDescriber = describer ?? new IdentityErrorDescriber();
}
- private bool _disposed;
-
///
/// Gets the database context for this store.
///
public TContext Context { get; private set; }
- ///
- /// Gets or sets the for any error that occurred with the current operation.
- ///
- public IdentityErrorDescriber ErrorDescriber { get; set; }
-
private DbSet UsersSet { get { return Context.Set(); } }
private DbSet Roles { get { return Context.Set(); } }
private DbSet UserClaims { get { return Context.Set(); } }
@@ -153,70 +145,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
private DbSet UserLogins { get { return Context.Set(); } }
private DbSet UserTokens { get { return Context.Set(); } }
- ///
- /// Called to create a new instance of a .
- ///
- /// The associated user.
- /// The associated role.
- ///
- protected virtual TUserRole CreateUserRole(TUser user, TRole role)
- {
- return new TUserRole()
- {
- UserId = user.Id,
- RoleId = role.Id
- };
- }
-
- ///
- /// Called to create a new instance of a .
- ///
- /// The associated user.
- /// The associated claim.
- ///
- protected virtual TUserClaim CreateUserClaim(TUser user, Claim claim)
- {
- var userClaim = new TUserClaim { UserId = user.Id };
- userClaim.InitializeFromClaim(claim);
- return userClaim;
- }
-
- ///
- /// Called to create a new instance of a .
- ///
- /// The associated user.
- /// The sasociated login.
- ///
- protected virtual TUserLogin CreateUserLogin(TUser user, UserLoginInfo login)
- {
- return new TUserLogin
- {
- UserId = user.Id,
- ProviderKey = login.ProviderKey,
- LoginProvider = login.LoginProvider,
- ProviderDisplayName = login.ProviderDisplayName
- };
- }
-
- ///
- /// Called to create a new instance of a .
- ///
- /// The associated user.
- /// The associated login provider.
- /// The name of the user token.
- /// The value of the user token.
- ///
- protected virtual TUserToken CreateUserToken(TUser user, string loginProvider, string name, string value)
- {
- return new TUserToken
- {
- UserId = user.Id,
- LoginProvider = loginProvider,
- Name = name,
- Value = value
- };
- }
-
///
/// Gets or sets a flag indicating if changes should be persisted after CreateAsync, UpdateAsync and DeleteAsync are called.
///
@@ -233,102 +161,13 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
return AutoSaveChanges ? Context.SaveChangesAsync(cancellationToken) : TaskCache.CompletedTask;
}
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.UserName = userName;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.NormalizedUserName = normalizedName;
- return TaskCache.CompletedTask;
- }
-
///
/// 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))
+ public async override Task CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -347,7 +186,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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))
+ public async override Task UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -376,7 +215,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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))
+ public async override Task DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -405,7 +244,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// 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))
+ public override Task FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -413,34 +252,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
return UsersSet.FindAsync(new object[] { 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)
- {
- return default(TKey);
- }
- 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 (object.Equals(id, default(TKey)))
- {
- return null;
- }
- return id.ToString();
- }
-
///
/// Finds and returns a user, if any, who has the specified normalized user name.
///
@@ -449,7 +260,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// 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))
+ public override Task FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -459,67 +270,18 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// A navigation property for the users the store contains.
///
- public virtual IQueryable Users
+ public override IQueryable Users
{
get { return UsersSet; }
}
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.PasswordHash = passwordHash;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.PasswordHash);
- }
-
- ///
- /// 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();
- return Task.FromResult(user.PasswordHash != null);
- }
-
///
/// Return a role with the normalized name if it exists.
///
/// The normalized role name.
/// The used to propagate notifications that the operation should be canceled.
/// The role if it exists.
- protected virtual Task FindRoleAsync(string normalizedRoleName, CancellationToken cancellationToken)
+ protected override Task FindRoleAsync(string normalizedRoleName, CancellationToken cancellationToken)
{
return Roles.SingleOrDefaultAsync(r => r.NormalizedName == normalizedRoleName, cancellationToken);
}
@@ -531,7 +293,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// The role's id.
/// The used to propagate notifications that the operation should be canceled.
/// The user role if it exists.
- protected virtual Task FindUserRoleAsync(TKey userId, TKey roleId, CancellationToken cancellationToken)
+ protected override Task FindUserRoleAsync(TKey userId, TKey roleId, CancellationToken cancellationToken)
{
return UserRoles.FindAsync(new object[] { userId, roleId }, cancellationToken);
}
@@ -542,7 +304,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// The user's id.
/// The used to propagate notifications that the operation should be canceled.
/// The user if it exists.
- protected virtual Task FindUserAsync(TKey userId, CancellationToken cancellationToken)
+ protected override Task FindUserAsync(TKey userId, CancellationToken cancellationToken)
{
return Users.SingleOrDefaultAsync(u => u.Id.Equals(userId), cancellationToken);
}
@@ -555,7 +317,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// The key provided by the to identify a user.
/// The used to propagate notifications that the operation should be canceled.
/// The user login if it exists.
- protected virtual Task FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, CancellationToken cancellationToken)
+ protected override Task FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, CancellationToken cancellationToken)
{
return UserLogins.SingleOrDefaultAsync(userLogin => userLogin.UserId.Equals(userId) && userLogin.LoginProvider == loginProvider && userLogin.ProviderKey == providerKey, cancellationToken);
}
@@ -567,7 +329,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// The key provided by the to identify a user.
/// The used to propagate notifications that the operation should be canceled.
/// The user login if it exists.
- protected virtual Task FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken)
+ protected override Task FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken)
{
return UserLogins.SingleOrDefaultAsync(userLogin => userLogin.LoginProvider == loginProvider && userLogin.ProviderKey == providerKey, cancellationToken);
}
@@ -580,7 +342,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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 normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
+ public async override Task AddToRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -607,7 +369,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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 normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
+ public async override Task RemoveFromRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -636,7 +398,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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))
+ public override async Task> GetRolesAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -660,7 +422,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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 normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
+ public override async Task IsInRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -681,32 +443,13 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
return false;
}
- ///
- /// Throws if this class has been disposed.
- ///
- protected void ThrowIfDisposed()
- {
- if (_disposed)
- {
- throw new ObjectDisposedException(GetType().Name);
- }
- }
-
- ///
- /// Dispose the store
- ///
- public void Dispose()
- {
- _disposed = true;
- }
-
///
/// 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))
+ public async override Task> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
{
ThrowIfDisposed();
if (user == null)
@@ -724,7 +467,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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))
+ public override Task AddClaimsAsync(TUser user, IEnumerable claims, CancellationToken cancellationToken = default(CancellationToken))
{
ThrowIfDisposed();
if (user == null)
@@ -750,7 +493,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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))
+ public async override Task ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim, CancellationToken cancellationToken = default(CancellationToken))
{
ThrowIfDisposed();
if (user == null)
@@ -781,7 +524,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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))
+ public async override Task RemoveClaimsAsync(TUser user, IEnumerable claims, CancellationToken cancellationToken = default(CancellationToken))
{
ThrowIfDisposed();
if (user == null)
@@ -809,7 +552,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// 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,
+ public override Task AddLoginAsync(TUser user, UserLoginInfo login,
CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
@@ -834,7 +577,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// The key provided by the to identify a 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,
+ public override async Task RemoveLoginAsync(TUser user, string loginProvider, string providerKey,
CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
@@ -858,7 +601,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// 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))
+ public async override Task> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -880,7 +623,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// 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,
+ public async override Task FindByLoginAsync(string loginProvider, string providerKey,
CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
@@ -893,120 +636,6 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
return null;
}
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.EmailConfirmed);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.EmailConfirmed = confirmed;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.Email = email;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.NormalizedEmail = normalizedEmail;
- return TaskCache.CompletedTask;
- }
-
///
/// Gets the user, if any, associated with the specified, normalized email address.
///
@@ -1015,301 +644,13 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// 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))
+ public override Task FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
return Users.FirstOrDefaultAsync(u => u.NormalizedEmail == normalizedEmail, cancellationToken);
}
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.LockoutEnd);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.LockoutEnd = lockoutEnd;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.AccessFailedCount++;
- return Task.FromResult(user.AccessFailedCount);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.AccessFailedCount = 0;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.AccessFailedCount);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.LockoutEnabled);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.LockoutEnabled = enabled;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.PhoneNumber = phoneNumber;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.PhoneNumber);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.PhoneNumberConfirmed);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.PhoneNumberConfirmed = confirmed;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- if (stamp == null)
- {
- throw new ArgumentNullException(nameof(stamp));
- }
- user.SecurityStamp = stamp;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.SecurityStamp);
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- user.TwoFactorEnabled = enabled;
- return TaskCache.CompletedTask;
- }
-
- ///
- /// 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();
- ThrowIfDisposed();
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- return Task.FromResult(user.TwoFactorEnabled);
- }
-
///
/// Retrieves all users with the specified claim.
///
@@ -1318,7 +659,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// The contains a list of users, if any, that contain the specified claim.
///
- public async virtual Task> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken))
+ public async override Task> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -1344,7 +685,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
///
/// The contains a list of users, if any, that are in the specified role.
///
- public async virtual Task> GetUsersInRoleAsync(string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
+ public async override Task> GetUsersInRoleAsync(string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken))
{
cancellationToken.ThrowIfCancellationRequested();
ThrowIfDisposed();
@@ -1375,155 +716,30 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// The name of the token.
/// The used to propagate notifications that the operation should be canceled.
/// The user token if it exists.
- protected virtual Task FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
+ protected override Task FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
=> UserTokens.FindAsync(new object[] { user.Id, loginProvider, name }, cancellationToken);
///
- /// Sets the token value for a particular user.
+ /// Add a new user token.
///
- /// The user.
- /// The authentication provider for the token.
- /// The name of the token.
- /// The value of the token.
- /// The used to propagate notifications that the operation should be canceled.
- /// The that represents the asynchronous operation.
- public virtual async Task SetTokenAsync(TUser user, string loginProvider, string name, string value, CancellationToken cancellationToken)
+ /// The token to be added.
+ ///
+ protected override Task AddUserTokenAsync(TUserToken token)
{
- cancellationToken.ThrowIfCancellationRequested();
- ThrowIfDisposed();
-
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
-
- var token = await FindTokenAsync(user, loginProvider, name, cancellationToken);
- if (token == null)
- {
- UserTokens.Add(CreateUserToken(user, loginProvider, name, value));
- }
- else
- {
- token.Value = value;
- }
+ UserTokens.Add(token);
+ return TaskCache.CompletedTask;
}
- ///
- /// Deletes a token for a user.
- ///
- /// The user.
- /// The authentication provider for the token.
- /// The name of the token.
- /// The used to propagate notifications that the operation should be canceled.
- /// The that represents the asynchronous operation.
- public virtual async Task RemoveTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
- {
- cancellationToken.ThrowIfCancellationRequested();
- ThrowIfDisposed();
-
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- var entry = await FindTokenAsync(user, loginProvider, name, cancellationToken);
- if (entry != null)
- {
- UserTokens.Remove(entry);
- }
- }
///
- /// Returns the token value.
+ /// Remove a new user token.
///
- /// The user.
- /// The authentication provider for the token.
- /// The name of the token.
- /// The used to propagate notifications that the operation should be canceled.
- /// The that represents the asynchronous operation.
- public virtual async Task GetTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
+ /// The token to be removed.
+ ///
+ protected override Task RemoveUserTokenAsync(TUserToken token)
{
- cancellationToken.ThrowIfCancellationRequested();
- ThrowIfDisposed();
-
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- var entry = await FindTokenAsync(user, loginProvider, name, cancellationToken);
- return entry?.Value;
- }
-
- private const string InternalLoginProvider = "[AspNetUserStore]";
- private const string AuthenticatorKeyTokenName = "AuthenticatorKey";
- private const string RecoveryCodeTokenName = "RecoveryCodes";
-
- ///
- /// Sets the authenticator key for the specified .
- ///
- /// The user whose authenticator key should be set.
- /// The authenticator key to set.
- /// The used to propagate notifications that the operation should be canceled.
- /// The that represents the asynchronous operation.
- public virtual Task SetAuthenticatorKeyAsync(TUser user, string key, CancellationToken cancellationToken)
- {
- return SetTokenAsync(user, InternalLoginProvider, AuthenticatorKeyTokenName, key, cancellationToken);
- }
-
- ///
- /// Get the authenticator key 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 GetAuthenticatorKeyAsync(TUser user, CancellationToken cancellationToken)
- {
- return GetTokenAsync(user, InternalLoginProvider, AuthenticatorKeyTokenName, cancellationToken);
- }
-
- ///
- /// Updates the recovery codes for the user while invalidating any previous recovery codes.
- ///
- /// The user to store new recovery codes for.
- /// The new recovery codes for the user.
- /// The used to propagate notifications that the operation should be canceled.
- /// The new recovery codes for the user.
- public virtual Task ReplaceCodesAsync(TUser user, IEnumerable recoveryCodes, CancellationToken cancellationToken)
- {
- var mergedCodes = string.Join(";", recoveryCodes);
- return SetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, mergedCodes, cancellationToken);
- }
-
- ///
- /// Returns whether a recovery code is valid for a user. Note: recovery codes are only valid
- /// once, and will be invalid after use.
- ///
- /// The user who owns the recovery code.
- /// The recovery code to use.
- /// The used to propagate notifications that the operation should be canceled.
- /// True if the recovery code was found for the user.
- public virtual async Task RedeemCodeAsync(TUser user, string code, CancellationToken cancellationToken)
- {
- cancellationToken.ThrowIfCancellationRequested();
- ThrowIfDisposed();
-
- if (user == null)
- {
- throw new ArgumentNullException(nameof(user));
- }
- if (code == null)
- {
- throw new ArgumentNullException(nameof(code));
- }
-
- var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken) ?? "";
- var splitCodes = mergedCodes.Split(';');
- if (splitCodes.Contains(code))
- {
- var updatedCodes = new List(splitCodes.Where(s => s != code));
- await ReplaceCodesAsync(user, updatedCodes, cancellationToken);
- return true;
- }
- return false;
+ UserTokens.Remove(token);
+ return TaskCache.CompletedTask;
}
}
}
diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/breakingchanges.netcore.json b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/breakingchanges.netcore.json
index fc028d1e5c..93954d1e96 100644
--- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/breakingchanges.netcore.json
+++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/breakingchanges.netcore.json
@@ -1,36 +1,103 @@
[
- {
- "TypeId": "public abstract class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext : Microsoft.EntityFrameworkCore.DbContext where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T2 : System.IEquatable where T3 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim where T4 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T5 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin where T6 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim where T7 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken",
- "Kind": "Removal"
- },
- {
- "TypeId": "public abstract class Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore : Microsoft.AspNetCore.Identity.IQueryableRoleStore, Microsoft.AspNetCore.Identity.IRoleClaimStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T1 : Microsoft.EntityFrameworkCore.DbContext where T2 : System.IEquatable where T3 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T4 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim",
- "Kind": "Removal"
- },
- {
- "TypeId": "public abstract class Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore : Microsoft.AspNetCore.Identity.IUserLoginStore, Microsoft.AspNetCore.Identity.IUserRoleStore, Microsoft.AspNetCore.Identity.IUserClaimStore, Microsoft.AspNetCore.Identity.IUserPasswordStore, Microsoft.AspNetCore.Identity.IUserSecurityStampStore, Microsoft.AspNetCore.Identity.IUserEmailStore, Microsoft.AspNetCore.Identity.IUserLockoutStore, Microsoft.AspNetCore.Identity.IUserPhoneNumberStore, Microsoft.AspNetCore.Identity.IQueryableUserStore, Microsoft.AspNetCore.Identity.IUserTwoFactorStore, Microsoft.AspNetCore.Identity.IUserAuthenticationTokenStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole> where T2 : Microsoft.EntityFrameworkCore.DbContext where T3 : System.IEquatable where T4 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim where T5 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T6 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin where T7 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken",
- "Kind": "Removal"
- },
- {
- "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T0 : System.IEquatable",
- "Kind": "Removal"
- },
- {
- "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin> where T0 : System.IEquatable",
- "Kind": "Removal"
- },
- {
- "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken> where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T2 : Microsoft.EntityFrameworkCore.DbContext where T3 : System.IEquatable",
- "Kind": "Removal"
- },
- {
- "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim> where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T1 : Microsoft.EntityFrameworkCore.DbContext where T2 : System.IEquatable",
- "MemberId": "protected override Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim CreateRoleClaim(T0 role, System.Security.Claims.Claim claim)",
- "Kind": "Removal"
- },
- {
- "TypeId": "public static class Microsoft.Extensions.DependencyInjection.IdentityEntityFrameworkBuilderExtensions",
- "MemberId": "public static new Microsoft.AspNetCore.Identity.IdentityBuilder AddEntityFrameworkStores(this Microsoft.AspNetCore.Identity.IdentityBuilder builder) where T0 : Microsoft.EntityFrameworkCore.DbContext where T1 : System.IEquatable",
- "Kind": "Removal"
- }
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken> where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T2 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T0 : System.IEquatable where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T2 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim> where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim> where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T1 : Microsoft.EntityFrameworkCore.DbContext where T2 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T1 : Microsoft.EntityFrameworkCore.DbContext",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore>",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T2 : Microsoft.EntityFrameworkCore.DbContext",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser, new()",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public abstract class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityDbContext : Microsoft.EntityFrameworkCore.DbContext where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T2 : System.IEquatable where T3 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim where T4 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T5 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin where T6 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim where T7 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public abstract class Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore : Microsoft.AspNetCore.Identity.IQueryableRoleStore, Microsoft.AspNetCore.Identity.IRoleClaimStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole where T1 : Microsoft.EntityFrameworkCore.DbContext where T2 : System.IEquatable where T3 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T4 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public abstract class Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore : Microsoft.AspNetCore.Identity.IUserLoginStore, Microsoft.AspNetCore.Identity.IUserRoleStore, Microsoft.AspNetCore.Identity.IUserClaimStore, Microsoft.AspNetCore.Identity.IUserPasswordStore, Microsoft.AspNetCore.Identity.IUserSecurityStampStore, Microsoft.AspNetCore.Identity.IUserEmailStore, Microsoft.AspNetCore.Identity.IUserLockoutStore, Microsoft.AspNetCore.Identity.IUserPhoneNumberStore, Microsoft.AspNetCore.Identity.IQueryableUserStore, Microsoft.AspNetCore.Identity.IUserTwoFactorStore, Microsoft.AspNetCore.Identity.IUserAuthenticationTokenStore where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole> where T2 : Microsoft.EntityFrameworkCore.DbContext where T3 : System.IEquatable where T4 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim where T5 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole where T6 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin where T7 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin> where T0 : System.IEquatable",
+ "Kind": "Removal"
+ },
+ {
+ "TypeId": "public class Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore : Microsoft.AspNetCore.Identity.EntityFrameworkCore.UserStore, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin, Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken> where T0 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUser where T1 : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole