filmov
tv
ASP.NET MVC 5 6 Framework Identity 2 Role User Authentication Managment Configuration in C#

Показать описание
PLEASE READ
This Video will show you how to add functionality to a Microsoft MVC ASP.NET application to create and instantiate the RoleManager with Identity 2, so that you can
List Roles, Create a Role and Assign a role to a user through ApplicationUserManager.
You will also assign the authorization of a role to an action within a controller.
Identity 2 provides the necessary functionality to create, manage users, roles, authentication of two factors, external providers such as Facebook, Twitter, Google, sending SMS and EMAIL for verification, although we must provide our own provider
For the management of the user we have UserManager
For role management we have RoleManager
For persistence we can use the Entity Framework context
This particular case treats Individual User Accounts, but works equally for Active Directory, Windows accounts, and other persistence providers like Oracle
This example was made with Visual Studio 2017 and MVC 6, however you can replicate it using other versions. For example with MVC 5 and Visual Studio 2015.
This example was written in C #, but the translation to VisualBasic should not be a mystery
The idea of the video is to show the basic functionality but it remains as work to make the optimizations and validations for a robust software and to control the flow of authentication and authorization.
You could for example use it as the basis for creating a role-based authentication control system (RBAC)
It is possible to use the same Identity system but in a Windows Foms application, using all the infrastructure already proposed by Identity
The pending work would be to create a Custom AuthorizeAttribute that allows you to have more control over the flow of authorization and authentication
Using Reflection you could get all the public actions inside the controllers and assign them to a specific role.
The topics that could bring you to this video can be
OWIN Authentication
Katana
IdentityRole
RoleManager
ApplicationRoleManager
ApplicationDbContext
Individual User Accounts
ApplicationUserManager
ApplicationSignInManager
App.CreatePerOwinContext ApplicationUserManager (ApplicationUserManager.Create)
App.CreatePerOwinContext ApplicationRoleManager (ApplicationRoleManager.Create)
[Authorize (Roles = "")]
RoleManager.RoleExists (newRole.RoleName)
RoleManager.CreateAsync (_newRole)
RoleManager.Create (_newRole)
RoleManager.RoleExists (_roleName)
UserManager.AddToRole (_userId, roleName)
This Video will show you how to add functionality to a Microsoft MVC ASP.NET application to create and instantiate the RoleManager with Identity 2, so that you can
List Roles, Create a Role and Assign a role to a user through ApplicationUserManager.
You will also assign the authorization of a role to an action within a controller.
Identity 2 provides the necessary functionality to create, manage users, roles, authentication of two factors, external providers such as Facebook, Twitter, Google, sending SMS and EMAIL for verification, although we must provide our own provider
For the management of the user we have UserManager
For role management we have RoleManager
For persistence we can use the Entity Framework context
This particular case treats Individual User Accounts, but works equally for Active Directory, Windows accounts, and other persistence providers like Oracle
This example was made with Visual Studio 2017 and MVC 6, however you can replicate it using other versions. For example with MVC 5 and Visual Studio 2015.
This example was written in C #, but the translation to VisualBasic should not be a mystery
The idea of the video is to show the basic functionality but it remains as work to make the optimizations and validations for a robust software and to control the flow of authentication and authorization.
You could for example use it as the basis for creating a role-based authentication control system (RBAC)
It is possible to use the same Identity system but in a Windows Foms application, using all the infrastructure already proposed by Identity
The pending work would be to create a Custom AuthorizeAttribute that allows you to have more control over the flow of authorization and authentication
Using Reflection you could get all the public actions inside the controllers and assign them to a specific role.
The topics that could bring you to this video can be
OWIN Authentication
Katana
IdentityRole
RoleManager
ApplicationRoleManager
ApplicationDbContext
Individual User Accounts
ApplicationUserManager
ApplicationSignInManager
App.CreatePerOwinContext ApplicationUserManager (ApplicationUserManager.Create)
App.CreatePerOwinContext ApplicationRoleManager (ApplicationRoleManager.Create)
[Authorize (Roles = "")]
RoleManager.RoleExists (newRole.RoleName)
RoleManager.CreateAsync (_newRole)
RoleManager.Create (_newRole)
RoleManager.RoleExists (_roleName)
UserManager.AddToRole (_userId, roleName)
Комментарии