106 Security: Server Side Authorization. WebApi services. - chempkovsky/CS82ANGULAR GitHub Wiki
- aspnetmodelView
- aspnetroleView
- aspnetrolemaskView
- aspnetuserView
- aspnetusermaskView
- aspnetuserpermsView
- aspnetuserrolesView
Security has two aspects: Authentication and Authorization
- In the article 105 we imported the definitions of the Views.
- The Import Action copies not only the View settings but WebApi service as well
-
Note: In all the cases before current article we did apply
DefaultWebApiService.Core.cs.t4
orDefaultWebApiServiceWithMassTransit.Core.cs.t4
scripts to generate the code. For some Views in this article will apply other t4-scrips.- Please, pay special attention to the t4-script which will be used for the Security Views
-
For all the security views the following steps will be the same
- right click
Controllers
-folder of thePhBkControllers.csproj
-project and run WebApi services Wizard - on the first page
- click
Next
-button
- click
- on the second page
- select
PhBkContext.csproj
-project - select
aspnetchckdbcontext
-DbContext - click
Next
-button
- select
- right click
- on the third page the setting must be as follows
- click
Next
-button
- click
Click to show the picture
- on the fourth page
- select
DefaultWebApiService.Core.cs.t4
-script - click
Next
-button
- select
- on the fifth page
- click
Save
-button - click
Next
-button
- click
- on the third page the setting must be as follows
- click
Next
-button
- click
Click to show the picture
- on the fourth page
- select
WebApiAspNetRoleService.cs.t4
-script - click
Next
-button
- select
- on the fifth page
- click
Save
-button - click
Next
-button
- click
- on the third page the setting must be as follows
- click
Next
-button
- click
Click to show the picture
- on the fourth page
- select
DefaultWebApiService.Core.cs.t4
-script - click
Next
-button
- select
- on the fifth page
- click
Save
-button - click
Next
-button
- click
- on the third page the setting must be as follows
- click
Next
-button
- click
Click to show the picture
- on the fourth page
- select
WebApiAspNetUserService.cs.t4
-script - click
Next
-button
- select
- on the fifth page
- click
Save
-button - click
Next
-button
- click
- on the third page the setting must be as follows
- click
Next
-button
- click
Click to show the picture
- on the fourth page
- select
WebApiAspNetUserMasksService.cs.t4
-script - click
Next
-button
- select
- on the fifth page
- click
Save
-button - click
Next
-button
- click
- on the third page the setting must be as follows
- click
Next
-button
- click
Click to show the picture
- on the fourth page
- select
WebApiAspNetUserPermsService.cs.t4
-script - click
Next
-button
- select
- on the fifth page
- click
Save
-button - click
Next
-button
- click
- on the third page the setting must be as follows
- click
Next
-button
- click
Click to show the picture
- on the fourth page
- select
WebApiAspNetUserRolesService.cs.t4
-script - click
Next
-button
- select
- on the fifth page
- click
Save
-button - click
Next
-button
- click