Whais ASP.NeCore Identity?

Identity helper functionalities

ASP.Net core Identity helper functionalities Step 1

ASP.Net core Identity helper functionalities Step 2

Structure and Architecture

ASP.Net core Identity Structure and Architecture Step 1

ASP.Net core Identity Structure and Architecture Step 2

UserManager<TUser>

public UserManager(IUserStore<TUser> store,
	IOptions<IdentityOptions> optionsAccessor,
	IPasswordHasher<TUser> passwordHasher,
	IEnumerable<IUserValidator<TUser>> userValidators,
	IEnumerable<IPasswordValidator<TUser>> passwordValidators,
	ILookupNormalizer keyNormalizer,
	IdentityErrorDescriber errors,
	IServiceProvider services,
	ILogger<UserManager<TUser>> logger)
{
	// ... ... ...
}

RoleManager<TRole>

public RoleManager(IRoleStore<TRole> store,
	IEnumerable<IRoleValidator<TRole>> roleValidators,
	ILookupNormalizer keyNormalizer,
	IdentityErrorDescriber errors,
	ILogger<RoleManager<TRole>> logger)
{
	// ... ... ...
}

IUserStore<TUser> interface

Task<IdentityResult> CreateAsync(TUser user, CancellationToken token);
Task<IdentityResult> UpdateAsync(TUser user, CancellationToken token);
Task<IdentityResult> DeleteAsync(TUser user, CancellationToken token);
Task<TUser> FindByIdAsync(string userId, CancellationToken token);
Task<TUser> FindByNameAsync(string normalizedUserName, CancellationToken token);
Task<string> GetUserIdAsync(TUser user, CancellationToken token);
Task<string> GetUserNameAsync(TUser user, CancellationToken token);
Task SetUserNameAsync(TUser user, string userName, CancellationToken token);
Task<string> GetNormalizedUserNameAsync(TUser user, CancellationToken token);
Task SetNormalizedUserNameAsync(TUser user, string normalizedName, CancellationToken token)

IUserStore sub-interfaces

We can extend any of these stores and add properties/methods if we need

Exploring default implementation

Scaffolding default implementation

Step-1

ASP.Net core Identity scaffolding default implementation Step 1

Step-2

ASP.Net core Identity scaffolding default implementation Step 2

Step-3

ASP.Net core Identity scaffolding default implementation Step 3

Step-4

ASP.Net core Identity scaffolding default implementation Step 4

Step-5

ASP.Net core Identity scaffolding default implementation Step 5

Step-6

ASP.Net core Identity scaffolding default implementation Step 6

Step-7

ASP.Net core Identity scaffolding default implementation Step 7

Step-8

ASP.Net core Identity scaffolding default implementation Step 8

Step-9

ASP.Net core Identity scaffolding default implementation Step 9

Step-10

ASP.Net core Identity scaffolding default implementation Step 10

Migration for identity store

Step-1

ASP.Net core Identity migration for identity store Step 1

Step-2

ASP.Net core Identity migration for identity store Step 2

Step-3

ASP.Net core Identity migration for identity store Step 3

Step-4

ASP.Net core Identity migration for identity store Step 4

Step-5

ASP.Net core Identity migration for identity store Step 5

Step-6

ASP.Net core Identity migration for identity store Step 6

Step-7

ASP.Net core Identity migration for identity store Step 7

Step-8

ASP.Net core Identity migration for identity store Step 8