diff --git a/sample/MongoIdentitySample.Mvc/MongoIdentitySample.Mvc.csproj b/sample/MongoIdentitySample.Mvc/MongoIdentitySample.Mvc.csproj
index 4b27629..278fafd 100644
--- a/sample/MongoIdentitySample.Mvc/MongoIdentitySample.Mvc.csproj
+++ b/sample/MongoIdentitySample.Mvc/MongoIdentitySample.Mvc.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/src/AspNetCore.Identity.MongoDbCore.csproj b/src/AspNetCore.Identity.MongoDbCore.csproj
index 86c1faa..5bd3c4f 100644
--- a/src/AspNetCore.Identity.MongoDbCore.csproj
+++ b/src/AspNetCore.Identity.MongoDbCore.csproj
@@ -16,7 +16,7 @@
-
+
diff --git a/src/AspNetCore.Identity.MongoDbCore.nuspec b/src/AspNetCore.Identity.MongoDbCore.nuspec
index 4e8360a..7db6350 100644
--- a/src/AspNetCore.Identity.MongoDbCore.nuspec
+++ b/src/AspNetCore.Identity.MongoDbCore.nuspec
@@ -2,7 +2,7 @@
AspNetCore.Identity.MongoDbCore
- 2.1.0
+ 2.1.1
AspNetCore.Identity.MongoDbCore
Alexandre Spieser
Alexandre Spieser
@@ -24,7 +24,7 @@
-
+
diff --git a/src/Models/MongoIdentityRole.cs b/src/Models/MongoIdentityRole.cs
index ff96374..4d16d93 100644
--- a/src/Models/MongoIdentityRole.cs
+++ b/src/Models/MongoIdentityRole.cs
@@ -1,5 +1,4 @@
-using AspNetCore.Identity.MongoDbCore.Extensions;
-using AspNetCore.Identity.MongoDbCore.Interfaces;
+using AspNetCore.Identity.MongoDbCore.Interfaces;
using Microsoft.AspNetCore.Identity;
using MongoDbGenericRepository.Models;
using MongoDbGenericRepository.Utils;
diff --git a/src/Models/MongoIdentityUser.cs b/src/Models/MongoIdentityUser.cs
index bec8759..075a357 100644
--- a/src/Models/MongoIdentityUser.cs
+++ b/src/Models/MongoIdentityUser.cs
@@ -1,12 +1,11 @@
-using System;
-using System.Collections.Generic;
-using MongoDbGenericRepository.Models;
-using System.Linq;
-using MongoDB.Driver;
using AspNetCore.Identity.MongoDbCore.Interfaces;
using Microsoft.AspNetCore.Identity;
-using AspNetCore.Identity.MongoDbCore.Extensions;
+using MongoDB.Driver;
+using MongoDbGenericRepository.Models;
using MongoDbGenericRepository.Utils;
+using System;
+using System.Collections.Generic;
+using System.Linq;
namespace AspNetCore.Identity.MongoDbCore.Models
{
@@ -157,7 +156,7 @@ namespace AspNetCore.Identity.MongoDbCore.Models
///
public virtual MongoIdentityUser SetVersion(int version)
{
- Version = 1;
+ Version = version;
return this;
}
diff --git a/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.deps.json b/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.deps.json
index c4d3783..52bdd00 100644
--- a/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.deps.json
+++ b/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.deps.json
@@ -11,7 +11,7 @@
"Microsoft.AspNetCore.Identity": "2.2.0",
"Microsoft.Extensions.Identity.Stores": "3.1.1",
"MongoDB.Driver": "2.9.3",
- "MongoDbGenericRepository": "1.4.1"
+ "MongoDbGenericRepository": "1.4.3"
},
"runtime": {
"AspNetCore.Identity.MongoDbCore.dll": {}
@@ -487,7 +487,7 @@
}
}
},
- "MongoDbGenericRepository/1.4.1": {
+ "MongoDbGenericRepository/1.4.3": {
"dependencies": {
"MongoDB.Driver": "2.9.3"
},
@@ -1741,12 +1741,12 @@
"path": "mongodb.driver.core/2.9.3",
"hashPath": "mongodb.driver.core.2.9.3.nupkg.sha512"
},
- "MongoDbGenericRepository/1.4.1": {
+ "MongoDbGenericRepository/1.4.3": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-TbRnmktTly5L/tZZxTqf6DC4HUHe9G1HVCzvsw0G07kRx2E6VKXGEKbCvG6rKZxqNv5/CcTS81xYST0P/GsCTg==",
- "path": "mongodbgenericrepository/1.4.1",
- "hashPath": "mongodbgenericrepository.1.4.1.nupkg.sha512"
+ "sha512": "sha512-SLJp2QnPzhYHUDyBXFekrLwaHWTqwHcCErm9LQlXOQq6VYU1sF5bSmAoQ7Ak0BPD8YTqVbTQc6wbSD8EJYMyAQ==",
+ "path": "mongodbgenericrepository/1.4.3",
+ "hashPath": "mongodbgenericrepository.1.4.3.nupkg.sha512"
},
"NETStandard.Library/1.6.1": {
"type": "package",
diff --git a/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.dll b/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.dll
index a10e40a..d732ccc 100644
Binary files a/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.dll and b/src/lib/netcoreapp3.1/AspNetCore.Identity.MongoDbCore.dll differ
diff --git a/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.deps.json b/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.deps.json
index e18543b..abbb166 100644
--- a/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.deps.json
+++ b/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.deps.json
@@ -12,7 +12,7 @@
"Microsoft.AspNetCore.Identity": "2.2.0",
"Microsoft.Extensions.Identity.Stores": "3.1.1",
"MongoDB.Driver": "2.9.3",
- "MongoDbGenericRepository": "1.4.1"
+ "MongoDbGenericRepository": "1.4.3"
},
"runtime": {
"AspNetCore.Identity.MongoDbCore.dll": {}
@@ -501,7 +501,7 @@
}
}
},
- "MongoDbGenericRepository/1.4.1": {
+ "MongoDbGenericRepository/1.4.3": {
"dependencies": {
"MongoDB.Driver": "2.9.3"
},
@@ -2034,12 +2034,12 @@
"path": "mongodb.driver.core/2.9.3",
"hashPath": "mongodb.driver.core.2.9.3.nupkg.sha512"
},
- "MongoDbGenericRepository/1.4.1": {
+ "MongoDbGenericRepository/1.4.3": {
"type": "package",
"serviceable": true,
- "sha512": "sha512-TbRnmktTly5L/tZZxTqf6DC4HUHe9G1HVCzvsw0G07kRx2E6VKXGEKbCvG6rKZxqNv5/CcTS81xYST0P/GsCTg==",
- "path": "mongodbgenericrepository/1.4.1",
- "hashPath": "mongodbgenericrepository.1.4.1.nupkg.sha512"
+ "sha512": "sha512-SLJp2QnPzhYHUDyBXFekrLwaHWTqwHcCErm9LQlXOQq6VYU1sF5bSmAoQ7Ak0BPD8YTqVbTQc6wbSD8EJYMyAQ==",
+ "path": "mongodbgenericrepository/1.4.3",
+ "hashPath": "mongodbgenericrepository.1.4.3.nupkg.sha512"
},
"NETStandard.Library/1.6.1": {
"type": "package",
diff --git a/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.dll b/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.dll
index 9929fd3..bd3c79d 100644
Binary files a/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.dll and b/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.dll differ
diff --git a/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.xml b/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.xml
index 1d95aa6..8ee2e9a 100644
--- a/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.xml
+++ b/src/lib/netstandard2.1/AspNetCore.Identity.MongoDbCore.xml
@@ -727,4 +727,1181 @@
Get a role's normalized name as an asynchronous operation.
The role whose normalized name should be retrieved.
- The
\ No newline at end of file
+ The used to propagate notifications that the operation should be canceled.
+ A that contains the name of the role.
+
+
+
+ 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.
+
+
+
+ Throws if this class has been disposed.
+
+
+
+
+ Dispose the stores
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Creates a entity representing a role claim.
+
+ The associated role.
+ The associated claim.
+ The role claim entity.
+
+
+
+ Creates a new instance of a persistence store for the specified user type.
+
+ The type representing a user.
+
+
+
+ Constructs a new instance of .
+
+ The .
+ The .
+
+
+
+ Represents a new instance of a persistence store for the specified user and role types.
+
+ The type representing a user.
+ The type of the data context class used to access the store.
+
+
+
+ Constructs a new instance of .
+
+ The .
+ The .
+
+
+
+ Represents a new instance of a persistence store for the specified user and role types.
+
+ The type representing a user.
+ The type of the data context class used to access the store.
+ The type of the primary key for a role.
+
+
+
+ Constructs a new instance of .
+
+ The .
+ The .
+
+
+
+ Represents a new instance of a persistence store for the specified user and role types.
+
+ The type representing a user.
+ The type of the data context class used to access the store.
+ The type of the primary key for a role.
+ The type representing a claim.
+ The type representing a user external login.
+ The type representing a user token.
+
+
+
+ Creates a new instance of the store.
+
+ The context used to access the store.
+ The used to describe store errors.
+
+
+
+ Gets the database context for this store.
+
+
+
+
+ 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.
+
+
+
+ Saves the current store.
+ The used to propagate notifications that the operation should be canceled.
+ The that represents the asynchronous operation.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ A navigation property for the users the store contains.
+
+
+
+
+ Return a user with the matching userId if it exists.
+
+ The user's id.
+ The used to propagate notifications that the operation should be canceled.
+ The user if it exists.
+
+
+
+ Return a user login with the matching userId, provider, providerKey if it exists.
+
+ The user's id.
+ The login provider name.
+ 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.
+
+
+
+ Return a user login with provider, providerKey if it exists.
+
+ The login provider name.
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Replaces the on the specified , with the .
+
+ The user 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Removes the given from the specified .
+
+ The user to remove the login from.
+ The login to remove from the user.
+ 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.
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ Find a user token if it exists.
+
+ The token owner.
+ The login provider for the token.
+ The name of the token.
+ The used to propagate notifications that the operation should be canceled.
+ The user token if it exists.
+
+
+
+ Add a new user token.
+
+ The token to be added.
+
+
+
+
+ Remove a new user token.
+
+ The token to be removed.
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Sets the token value for a particular user.
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Returns the token value.
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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 .
+
+
+
+ Returns how many recovery code are still valid for a user.
+
+ The user who owns the recovery code.
+ The used to propagate notifications that the operation should be canceled.
+ The number of valid recovery codes for the user..
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Represents a new instance of a persistence store for users, using the default implementation
+ of with a string as a primary key.
+
+
+
+
+ Constructs a new instance of .
+
+ The .
+ The .
+
+
+
+ Creates a new instance of a persistence store for the specified user type.
+
+ The type representing a user.
+
+
+
+ Constructs a new instance of .
+
+ The .
+ The .
+
+
+
+ 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.
+
+
+
+ Constructs a new instance of .
+
+ The .
+ The .
+
+
+
+ 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.
+
+
+
+ Constructs a new instance of .
+
+ The .
+ The .
+
+
+
+ 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.
+ The type representing a claim.
+ The type representing a user role.
+ The type representing a user external login.
+ The type representing a user token.
+ The type representing a role claim.
+
+
+
+ Creates a new instance of the store.
+
+ The context used to access the store.
+ The used to describe store errors.
+
+
+
+ Gets the database context for this store.
+
+
+
+
+ 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.
+
+
+
+ Saves the current store.
+ The used to propagate notifications that the operation should be canceled.
+ The that represents the asynchronous operation.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+
+ Converts the provided to a strongly typed key object.
+
+ The id to convert.
+ An instance of representing the provided .
+
+
+
+ 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.
+
+
+
+
+ A navigation property for the users the store contains.
+
+
+
+
+ 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.
+
+
+
+ Return a user role for the userId and roleId if it exists.
+
+ The user's id.
+ The role's id.
+ The used to propagate notifications that the operation should be canceled.
+ The user role if it exists.
+
+
+
+ Return a user with the matching userId if it exists.
+
+ The user's id.
+ The used to propagate notifications that the operation should be canceled.
+ The user if it exists.
+
+
+
+ Return a user login with the matching userId, provider, providerKey if it exists.
+
+ The user's id.
+ The login provider name.
+ 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.
+
+
+
+ Return a user login with provider, providerKey if it exists.
+
+ The login provider name.
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Replaces the on the specified , with the .
+
+ The user 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Removes the given from the specified .
+
+ The user to remove the login from.
+ The login to remove from the user.
+ 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.
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ 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.
+
+
+
+
+ Find a user token if it exists.
+
+ The token owner.
+ The login provider for the token.
+ The name of the token.
+ The used to propagate notifications that the operation should be canceled.
+ The user token if it exists.
+
+
+
+ Add a new user token.
+
+ The token to be added.
+
+
+
+
+ Remove a new user token.
+
+ The token to be removed.
+
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Sets the token value for a particular user.
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Returns the token value.
+
+ 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.
+
+
+
+ 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.
+
+
+
+ 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 .
+
+
+
+ Returns how many recovery code are still valid for a user.
+
+ The user who owns the recovery code.
+ The used to propagate notifications that the operation should be canceled.
+ The number of valid recovery codes for the user..
+
+
+
+ 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.
+
+
+
+ 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.
+
+
+
+ Represents the password hashing options
+
+
+
+
+ Gets options which use the IdentityV3 compat mode, and set the iteration count to 200000 PBKDF2-SHA256 iterations
+ (roughly 200ms of work)
+
+
+
+
+ Une classe de ressource fortement typée destinée, entre autres, à la consultation des chaînes localisées.
+
+
+
+
+ Retourne l'instance ResourceManager mise en cache utilisée par cette classe.
+
+
+
+
+ Remplace la propriété CurrentUICulture du thread actuel pour toutes
+ les recherches de ressources à l'aide de cette classe de ressource fortement typée.
+
+
+
+
+ Recherche une chaîne localisée semblable à AddMongoDbCoreStores can only be called with a role that derives from MongoIdentityRole<TKey, TUserRole, TRoleClaim>..
+
+
+
+
+ Recherche une chaîne localisée semblable à AddMongoDbCoreStores can only be called with a user that derives from MongoIdentityUser<TKey, TUserClaim, TUserRole, TUserLogin, TUserToken>..
+
+
+
+
+ Recherche une chaîne localisée semblable à Role {0} does not exist..
+
+
+
+
+ Recherche une chaîne localisée semblable à Value cannot be null or empty..
+
+
+
+
+ Contains extension methods to for adding MongoDb stores.
+
+
+
+
+ Adds an MongoDb implementation of identity information stores.
+
+ The MongoDb database context to use.
+ The instance this method extends.
+ A mongoDbContext
+ The instance this method extends.
+
+
+
+ Adds an MongoDb implementation of identity information stores.
+
+ The type representing a user.
+ The type representing a role.
+ The type of the primary key of the identity document.
+ The instance this method extends.
+
+
+
+
+
+ Adds an MongoDb implementation of identity information stores.
+
+ The type representing a user.
+ The type representing a role.
+ The type of the primary key of the identity document.
+ The instance this method extends.
+
+
+
+
diff --git a/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.IntegrationTests.csproj b/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.IntegrationTests.csproj
index 6066589..3c85947 100644
--- a/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.IntegrationTests.csproj
+++ b/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.IntegrationTests.csproj
@@ -7,7 +7,7 @@
-
+
@@ -21,7 +21,7 @@
-
+
diff --git a/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.Test/UserStoreTest.cs b/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.Test/UserStoreTest.cs
index 5f43b6a..dd877af 100644
--- a/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.Test/UserStoreTest.cs
+++ b/test/AspNetCore.Identity.MongoDbCore.IntegrationTests/AspNetCore.Identity.MongoDbCore.Test/UserStoreTest.cs
@@ -303,6 +303,44 @@ namespace AspNetCore.Identity.MongoDbCore.Test
IdentityResultAssert.IsFailure(await manager2.DeleteAsync(role2), new IdentityErrorDescriber().ConcurrencyFailure());
}
+ [Fact]
+ public async Task CorrectlyUpdatesUser()
+ {
+ // Arrange
+ const string originalEmail = "original@email.com";
+ const string newEmail1 = "new1@email.com";
+ const string newEmail2 = "new2@email.com";
+ var user = CreateTestUser();
+ user.Email = originalEmail;
+ var manager = CreateManager();
+ IdentityResultAssert.IsSuccess(await manager.CreateAsync(user));
+ var userToUpdate = await manager.FindByIdAsync(user.Id);
+ Assert.NotNull(user);
+ Assert.Equal(originalEmail, userToUpdate.Email);
+
+ // Act & Assert
+ // change the email to the new value newEmail1
+ userToUpdate.Email = newEmail1;
+ userToUpdate.UserName = newEmail1;
+ var updateResult1 = await manager.UpdateAsync(userToUpdate);
+ Assert.True(updateResult1.Succeeded);
+ var updatedUser1 = await manager.FindByIdAsync(user.Id);
+ Assert.NotNull(updatedUser1);
+ Assert.Equal(newEmail1, updatedUser1.Email);
+ Assert.Equal(newEmail1, updatedUser1.UserName);
+
+ // change the email to the new value newEmail2
+ userToUpdate.Email = newEmail2;
+ userToUpdate.UserName = newEmail2;
+ var updateResult2 = await manager.UpdateAsync(userToUpdate);
+ Assert.True(updateResult2.Succeeded);
+
+ var updatedUser2 = await manager.FindByIdAsync(user.Id);
+ Assert.NotNull(updatedUser2);
+ Assert.Equal(newEmail2, updatedUser2.Email);
+ Assert.Equal(newEmail2, updatedUser2.UserName);
+ }
+
protected override MongoDbIdentityUser CreateTestUser(string namePrefix = "", string email = "", string phoneNumber = "",
bool lockoutEnabled = false, DateTimeOffset? lockoutEnd = default(DateTimeOffset?), bool useNamePrefixAsUserName = false)
{