Advanced .Net Web Api Security: Permission Based Auth & Jwt
Published 8/2023
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz
Language: English | Size: 7.25 GB | Duration: 15h 37m
Published 8/2023
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz
Language: English | Size: 7.25 GB | Duration: 15h 37m
Mastering Secure Access Control in .NET: Advanced Authentication & Authorization with Users, Roles & Dynamic Permissions
What you'll learn
Immerse yourself in our Advanced .NET Security course, where you'll delve deep into crafting robust access control solutions.
Master the essentials by working with AspNet Core Identity and IdentityDbContext, gaining expertise in seamless user, role, and permission management.
Navigate the complexities of EntityFrameworkCore, mastering migrations and seamlessly seeding default roles, users, and permissions into your database.
Build a solid architectural base using Clean Architecture and harness CQRS with MediatR for streamlined, maintainable systems.
Master security with in-depth authentication, authorization, JWT intricacies, and permission-based access.
Enhance data integrity and user experiences with rigorous request validations using FluentValidation techniques.
Implement advanced security measures, including handling refresh tokens to fortify your applications against potential vulnerabilities.
Practice industry best standards by incorporating authentication on SwaggerUI, ensuring seamless and secure API access.
Craft permissions, master nuances: Requirement, Auth Handler, Policy Provider.
Discover the art of dynamic user-role and role-permission assignments, allowing for flexible and efficient management of access control.
Effortlessly manage user accounts with the ability to activate or deactivate users, enhancing security and compliance.
Safeguard your API endpoints with precision by leveraging permission attributes for foolproof access control.
Optimize requests with MediatR Pipeline; Embrace Dependency Injection for scalability.
Gain a comprehensive understanding of user, role, and permission management to enhance the overall user experience and data security.
Extra: Dive into Blazor WebAssembly, create interactive apps integrated with our API. Project Source code included.
Requirements
C# Programming Language
Description
Embark on an enriching journey with this Advanced .NET Security course, where we dive deep into crafting robust access control solutions. Starting with the fundamentals, you'll work with AspNet Core Identity and IdentityDbContext, learning how to seamlessly manage users, roles, and permissions.Navigate the intricacies of EntityFrameworkCore as you master migrations and seed default roles, users, and permissions into the database. With a strong foundation in place, we'll guide you through the world of Clean Architecture, CQRS, and the MediatR Library, empowering you to design efficient and maintainable systems.Authentication and authorization take center stage as we explore topics such as permission-based authorization and JWT generation/validation. Elevate your skillset further with request validations using FluentValidation, and gain insights into handling refresh tokens for enhanced security.Incorporate best practices with authentication on SwaggerUI, and learn the art of building permissions, along with the inner workings of Permission Requirement, Permission Authentication Handler, and Permission Policy Provider.Dynamic user-role and role-permission assignments are demystified, while you also learn to seamlessly activate/deactivate users and safeguard endpoints with permission attributes.We'll delve into the intricacies of the MediatR Pipeline Behaviour, emphasizing the significance of Dependency Injection in your projects. To empower you with a holistic approach, we offer comprehensive guidance on user, role, and permission management.As a Extra, explore the exciting realm of a Blazor WebAssembly Frontend App that interacts seamlessly with our API. Join us to transform your .NET skills and become a proficient architect of secure, and scalable web applications.
Overview
Section 1: Introduction
Lecture 1 What Will Learn Part 1
Lecture 2 What Will Learn Part 2
Lecture 3 What Will Learn Part 3
Section 2: Source Codes
Lecture 4 Backend
Section 3: The Solution Design
Lecture 5 Solutions Architecture
Lecture 6 Projects references
Lecture 7 Entity
Lecture 8 Nuget Packages
Lecture 9 Db Context - ORM
Lecture 10 Identity Db Context
Lecture 11 Db Context extensions
Lecture 12 Database connections
Lecture 13 Database Migration
Lecture 14 Migration script
Lecture 15 Identity User Extended
Lecture 16 Identity Role and Identity Role Claim extended
Lecture 17 Entity Type configurations
Lecture 18 Test Answer: Entity Type configuration
Lecture 19 Employee: Entity Type configuration
Lecture 20 Handling decimal config
Lecture 21 Understanding db migration and schema creation - part 1
Lecture 22 Understanding db migration, schema creation and db update - part 2
Lecture 23 Recap
Section 4: Authentication Constants
Lecture 24 Application Features Constants
Lecture 25 Application Actions and Claims Constants
Lecture 26 Application Role Groups and Default Roles Constants
Lecture 27 Collections
Lecture 28 Application Credentials and Permissions Constants
Lecture 29 Adding permissions and Building Permission list
Lecture 30 Add permissions to List of all permissions
Lecture 31 Adding permissions
Lecture 32 Permission list - Completing the statement
Section 5: Database seeder
Lecture 33 Database seeder - part 1
Lecture 34 Database seeder - part 2
Lecture 35 Database seeder - part 3
Lecture 36 Database seeder - part 4
Lecture 37 Database seeder - part 5
Lecture 38 Database seeder - part 6
Lecture 39 Database seeder - part 7
Lecture 40 Database seeder - part 8
Lecture 41 Assignment 1: Seed user functionality
Lecture 42 Assignment 1: Solution
Lecture 43 Register db seeder to dependency injection container - part 1
Lecture 44 Register Db Seeder to dependency injection container - part 2
Lecture 45 Complete and test db seeder
Section 6: Permissions Resources
Lecture 46 Permission Requirement
Lecture 47 Permission Authentication Handler
Lecture 48 Permission Policy Provider - part 1
Lecture 49 Permission Policy Provider - part 2
Lecture 50 Permission Policy Provider - part 3
Lecture 51 Registering Permission handler and Policy provider to DI container
Lecture 52 Default Token Provider to DI
Section 7: Application Models(request, response and wrappers) and Interfaces
Lecture 53 Token models and service - part 1
Lecture 54 Token service implementation - part 2
Lecture 55 Global Response Wrappers
Section 8: JWT - Generating a json web token
Lecture 56 Auth Token Generation - part 1
Lecture 57 Auth Token Generation - part 2
Lecture 58 Auth Token Generation - part 3
Lecture 59 Auth Token Generation - part 4
Lecture 60 Auth Token Generation - part 5
Lecture 61 Auth Token Generation - part 6
Lecture 62 Auth Token Generation - part 7
Lecture 63 Auth Token Generation - part 8
Lecture 64 Auth Token Generation - part 9
Lecture 65 Assignment 2: Refresh token implementation
Lecture 66 Assignment 2: Solution
Section 9: Features - Token Queries and api endpoint
Lecture 67 Get Token Query - part 1
Lecture 68 Get Token Query - part 2
Lecture 69 Controller error - IMediator
Lecture 70 Token Controller endpoint part 1
Lecture 71 Token Controller endpoint part 2
Section 10: Add JWT Authentication to DI Container
Lecture 72 Register JWT Authentication to DI Container - part 1
Lecture 73 Register JWT Authentication to DI Container - part 2
Lecture 74 Register JWT Authentication to DI Container - part 3
Lecture 75 Assignment 03
Lecture 76 Assignment 3: Solution - part 1
Lecture 77 Add Swagger Gen extension to DI
Lecture 78 Testing - Exception
Lecture 79 Register MediatR and Token Service to DI
Lecture 80 Test token generation
Lecture 81 Extend Authorization Attribute
Lecture 82 Protect endpoint with Permission Attribute
Section 11: Assignment 4: Full end to end
Lecture 83 The Assignment
Lecture 84 Assignment 4: Solution - part 1
Lecture 85 Assignment 4: Solution - part 2
Lecture 86 Assignment 4: Solution - part 3
Lecture 87 Assignment 4: Solution - part 4
Lecture 88 Assignment 4: Solution - part 5
Lecture 89 Assignment 4: Solution - part 6
Lecture 90 Assignment 4: Solution - part 7
Lecture 91 Assignment 4: Solution - part 8
Lecture 92 Assignment 4: Solution - part 9
Lecture 93 Assignment 4: Solution - part 10
Lecture 94 Assignment 4: Solution - part 11
Lecture 95 Assignment 4: Solution - part 12
Lecture 96 Assignment 4: Solution - part 13
Section 12: Features - User Commands and Queries
Lecture 97 User registration model
Lecture 98 User response model
Lecture 99 Implementing user registration - part 1
Lecture 100 Implementing user registration - part 2
Lecture 101 User validation before registering
Lecture 102 Role assignment
Lecture 103 User Registration - Identity Service
Lecture 104 User registration via mediatr command
Lecture 105 Testing User registration
Lecture 106 Troubleshooting user Authentication
Lecture 107 Password Hash
Lecture 108 Get User by UserId method implementation
Lecture 109 Adding AutoMapper mapping profile
Lecture 110 Get User by id query
Lecture 111 Test Get user by id endpoint
Lecture 112 Assignment 5: Get List of Users
Lecture 113 Assignment 5: Solution review
Lecture 114 Update User
Lecture 115 Implementing Update User
Lecture 116 Implementing Update User - Error fixing
Lecture 117 Update User endpoint
Lecture 118 Change User Password Implementation - part 1
Lecture 119 Change User Password Implementation - part 2
Lecture 120 Change User Password Implementation - part 3
Lecture 121 Test Change User Password
Lecture 122 Assignment 6: Activate/deactivate User
Lecture 123 Assignment 6: Solution review
Lecture 124 Test User Activation/Deactivation endpoint
Section 13: Feature: Application Role resources
Lecture 125 Identity Result - part 1
Lecture 126 Identity Result - part 2
Lecture 127 Adding View Model for Listing and Marking Application roles
Lecture 128 Exploring User Roles and Role Assignments part 1
Lecture 129 Exploring User Roles and Role Assignments part 2
Lecture 130 Exploring User Roles and Role Assignments part 3
Lecture 131 Testing User Roles endpoint
Lecture 132 Current Application User
Lecture 133 Current User service registration
Lecture 134 Update User Roles
Lecture 135 Role Permissions - part 1
Lecture 136 Role Permissions: Database - part 2
Lecture 137 User Authentication and Authorization - part 1
Lecture 138 User Authentication and Authorization - part 2
Lecture 139 Identity Result - verification
Lecture 140 User Role Update
Lecture 141 Update User Roles Command
Lecture 142 Test User Roles Update
Lecture 143 Custom Attribute - Authorize
Lecture 144 Test Custom Authorize attribute
Lecture 145 Assignment 7: No Authorization check
Lecture 146 Assignment 7: Solution
Lecture 147 Role Models(Classes)
Lecture 148 Create role method
Lecture 149 Role Creation and database management
Lecture 150 Implementing Role creating in database
Lecture 151 Namespace error fixing after folders renaming
Lecture 152 Services registration exception and testing
Lecture 153 Implementing Role service methods
Lecture 154 Adding a mapping configuration
Lecture 155 Testing Updating of a Role
Lecture 156 Assignment 8: Update role
Lecture 157 Assignment 8: Solution - part 1
Lecture 158 Assignment 8: Solution - part 2
Lecture 159 Get Role by RoleId
Lecture 160 Get Role by RoleId - endpoint
Lecture 161 Delete Role - Part 1
Lecture 162 Delete Role - Part 2
Lecture 163 Testing Role deletion
Lecture 164 Role Claim models
Lecture 165 Implementing get permissions
Lecture 166 Updating Role Permissions - part 1
Lecture 167 Updating Role Permissions - part 2
Lecture 168 Updating Role Permissions - part 3
Lecture 169 Updating Role Permissions - part 4
Lecture 170 Implementing Request Handler and api Endpoint for Updating Role Permissions
Lecture 171 Testing Role Permissions update
Lecture 172 Testing after permissions update
Section 14: Advance Concepts - MediatR Request Pipelines
Lecture 173 MediatR request Pipeline - Understanding
Lecture 174 Creating and Implementing Pipelines for Validation part 1
Lecture 175 Creating and Implementing Pipelines for Validation part 2
Lecture 176 Handling Custom Validation Exception
Lecture 177 Understanding Validation Pipeline behaviour
Lecture 178 Update Employee Command Validator
Lecture 179 Global Exception Handling - part 1
Lecture 180 Global Exception Handling - part 2
Lecture 181 Adding Error handling middleware
Lecture 182 Troubleshooting Validation Pipeline and Fluent validation bug
Lecture 183 Enhancing Employee Request validators - part 1
Lecture 184 Enhancing Employee Request validators - part 2
Lecture 185 Employee validators and User Registration
Lecture 186 User Registration Validator - db table alignment
Lecture 187 User Registration Request Validator - Add Get User by Email method
Lecture 188 User Registration Validation Completion
Lecture 189 Validation Error- Testing update employee validator
Lecture 190 Validation Pipeline behaviour bug fixing
Lecture 191 Improving Validation Pipeline Behaviour
Lecture 192 Test User Registration validator
Lecture 193 Validation Pipeline to return Global Response Wrapper
Lecture 194 Returning Response Wrapper when exceptions are raised
Section 15: Extra- Blazor Frontend App consuming the Api
Lecture 195 Project Demo - part 1
Lecture 196 Project Demo - part 2
Beginners who would like to know how to secure a web application,Juniors who would to add know how to best implement security within .NET web applications,Seniors who would like to take full control of application security with confident that their solutions are secured.,Architects who would like to explore different way of implementing secure applications