JWT Authentication: Build a Library with me(I) | How does it look like when it is built
Автор: Code with Saar
Загружено: 2021-06-14
Просмотров: 779
Описание:
Introducing a JWT authentication / authorization library, point out design considerations, techniques used behind it and so on.
This is the first episode of a series focusing on the user perspective to show a whole picture of the library.
Follow up topics are planned for details.
Demo Code:
https://github.com/xiaomi7732/CodeWit...
Library Code:
https://github.com/xiaomi7732/CodeWit...
Bookmarks
00:00 Introduction
01:43 Create an empty WebAPI
02:21 Add NuGet package: https://www.nuget.org/packages/CodeWi...
03:09 ConfigureServices by calling services.AddJWTAuth(), setup OnValidateUserInfo delegate
05:15 Configure ASP.NET Core middleware by calling app.UseJWTAuth() in Configure() method
05:43 Protect WeatherForecast controller with Authorization attribute
08:15 Customize route to get an access token (Default: `/token`) - by Action of Options
09:00 Setup signing secret - by appsettings.json
13:13 Customize OnValidateUserInfo for user validation
16:13 How to support role authentication / authorization
Remarks
Easier to use
Reuse my own code in various projects
Improve the library, benefits all projects that uses it.
What will you learn in this series
Deeper understanding of JWT authentication / authorization
Authentication
Authorization
Library Mindset
Multi-targeting
Build and release NuGet package
Library designs
Extension Method
IOptions pattern to allow powerful customization
Various configuration source - User-Secrets
Briefly touch
ASP.NET Core pipeline & middleware
Common Status Code for RESTful APIs
Json Serialization
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: