Initialize Admin User - Logic
Course Content
0 / 185 completedWhat we will develop
Introduction
What you will need to follow
Clean Architecture Solution Creation
Nullable Property Handling
Project Responsibilities Overview
School Entity Definition
Packages installations
Tenant Db Context
Tenant Entity Definition
Multitenant into Dependency Injection
Tenancy Constants
Application Role and Role Claim
Multitenancy into final Dependency Injection Container
Application User - IdentityUser
Base Db Context - Tenant database usage configuration (TenantInfo Property
Base Db Context - Identity Models
Application Db Context - Definition and DI
Base Db Context - Tenant database usage configuration
Connection Strings
Apply Configurations From Assembly
IEntity Type Configuration - AspNetCore Identity Tables
Application Db Context Migration
Tenant Db Migration
School Action Constants
School Feature Constants
School Permission Constant
School Permissions - Tenants
School Permissions - Identity and School
Role Constants
Claim Constants
School Permissions - Filters
Claim Group Inclusion
Initialize Database - Migrations
Initialize Default Roles
Assign Permissions To Role - Specific Role
Initialize Default Roles - Complete
Assign Permissions To Role - Logic
Initialize Database With Tenant - Logic
Tenant Db Seeder - Definition
Assign User to Admin Role
Initialize Admin User - Logic
Initialize Application Db For Tenant
Database Seeder into Dependency Injection
Identity Service into Dependency Injection
Database Seeder Test - Success
Unauthorized Exception Definition
Response Wrapper Interfaces - Definitions
More Custom Exceptions - Definitions
Non-Generic Response Wrapper - Failure implementations (Function Over Load)
Non-Generic Response Wrapper - Failure implementation
Non-Generic Response Wrapper - Failure implementations (Function Over Load)
Non-Generic Response Wrapper - Success implementations complete
Generic Response Wrapper - Definition and Implementations
Permission Requirement - Definition
Permission Policy Provider - Definition
Permission Authorization Handler - Definition
Permission Base Auth into Dependency Injection
Token Request and Response models
Refresh Token Request model
Token Service Interface Definition
TokenService - Implementation (Dependencies)
TokenService - Login Implementation(Tenant Subscription Expiry Validation)
TokenService - Login Implementation(Validations)
Claims Principal Extensions
Login Full Implementations
Token Generation - Inclusion of Claims
Code refactoring - Configurations
Code refactoring - Configuration into Dependency Injection
Refresh Token - Complete implementation
Add Jwt Authentication into Dependency Injection part 2
Add Jwt Authentication into Dependency Injection part 3
Tenant Header as an Attribute
Tenant Header - How it will be
Add Jwt Authentication into Dependency Injection part 1
Swagger Settings
Swagger Header Attribute Processor
Use Open Api Documentation middleware
Swagger Global Auth Processor
Default config cleanup
Add Open Api Documentation into Dependency Injection
Authorize Attribute
API Testing - POST Authorize Attribute
Packages Installation
MediatR and FluentValidation into Dependency Injection
Get Refresh Token Query
Get Token Query
Base Api Controller
Refresh Token endpoint
Refresh token permission inclusion
Login Endpoint - Get Token
Login Endpoint - Testing
Protected Endpoint Access testing
Error Handling Middleware
Error Handling Middleware - Testing
Error handling middleware code fix
Tenant request and response models
Tenants Service - Definition
Create Tenant Command
Activate Tenant Command
Deactivate Tenant Command
Update Tenant Subscription Command
Get Tenant By Id Query
Get Tenants Query
Create Tenant Endpoint
Tenants Endpoints - All
Tenant Service Implementation - Dependencies
Activate implementation
Deactivate and Get Tenant By Id implementations
Get Tenants and Update Subscription implementations
Create Tenant implementation
Tenant service into Dependency Injection
Create Tenant Testing - Shared database
New Tenant User Access testing
New Tenant Role Claims testing
Seeding Tenant Admin user with specified values
Tenant Dedicated database testing
Tenant User testing
School Request and Response models
School Service Definition
School Service implementation - Complete
Delete School Command
Update School Command
Create School Command
Get School By Id Query
Get School By Name Query
Get Schools Query
FluentValidation preparation
Create School Command Validator
Create School Request Validator
Update School Command Validator
Update School Request Validator
Create School Endpoint
Update and delete school endpoints
School GET endpoints
Validation Pipeline Behavior part 1
Validation Pipeline Behavior - How it works (testing)
Validation Pipeline Behavior - How it Should works (testing)
Validation Pipeline Behavior part 2
Role models
Update Role Permissions Request model
Role Service interface definition
Role Service Implementation - Dependencies
Create Role and IdentityResult Error Descriptions Helper implementations
Delete role implementation - Not default roles
Delete role implementation - Not currently assigned role
Get role By Id implementation
Does role exists and Get all roles implementations
Get role with Permissions implementation
Update Role Permissions implementation - Not Admin role
Update role implementation
Update Role Permissions - Tenants permissions are removed for non root tenant
Role Service into Dependency Injection
Create Role Command
More Role commands
Update Role Permissions implementation - Drop and Lift
User request models
Role queries
User Role Request models
Current User Service definition
User response models
User Service definition
User Service implementation - Dependencies
Assign Roles implementation - at least two admin users for each tenant
Assign Roles implementation - not admin for root tenant
Activate Or Deactivate implementation
Assign Roles implementation - actual assignment
Change User Password implementation
Delete user implementation
Get all users and by id implementations
Create User implementation
IsEmailTaken and IsPermissionAssigned implementations
Get User Permissions implementation
Get User Roles implementation
Update User implementation
Create User Command
Current User Middleware
Current User Service implementation
User commands
User Queries
Get User By Id Query
Register User endpoint
User endpoints
Final code cleanup
Final Testing