У нас вы можете посмотреть бесплатно NestJS: JWT- and Role based API Protection | Blog Project V-04 или скачать в максимальном доступном качестве, которое было загружено на ютуб. Для скачивания выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса savevideohd.ru
Thumbail remade on 06.06.2020. Link to repository: Github: https://github.com/ThomasOliver545/Bl... Gitlab: https://gitlab.com/youtube-public/blog My Patreon: https://www.patreon.com/user?u=42856132 If you clone the repo, don't forget to replace the Postgres Database Url in the .env file. Timestamps: 00:00 Introduction 00:08 What will be covered in this video 00:30 Structure of Video 00:50 Video Outcome, short look in the code and show endpoint protection with postman 03:04 Looking at the user story 05:00 switching to new branch with git flow and look in readme 06:30 develop @hasRole() annotation 09:20 JWT Auth Guard to check if a token is attached 10:40 JWT Strategy to extract the token and validate the token 12:20 RolesGuard, to check if the user is having the role that is specified in the hasRole() annotation 18:00 Solving some issues, e.g. circular dependency of auth.module and user.module 24:00 RolesGuard, expand with logic, to check if the user has the role 28:32 user.interface and user.entity, add property "role" to it 32:00 fix user.interface 34:00 RolesGuard, use indexOf() to check if the role of the user is there 37:50 Solve undefined error 38:50 fix 'create()' method, extend it with the new 'role' property 41:50 fix annotation on endpoint, switch 'Admin' with 'admin' 42:10 Explanation what is all happening in the code 45:10 New Endpoint PUT 'updateRoleOfUser()' 47:37 UserService 'updateRoleOfUser()' 49:30 Protect new Endpoint with hasRole() and JWT and RolesGuard 50:40 Write new story with some refactoring tasks 51:50 save postman requests in repository 53:10 Commit changes and finish branche and merge develop back to master 55:10 Close User Story 55:30 Short look at next video (pagination of GET all Users Endpoint) I appreciate every feedback in the comments and would be happy if you also like && subscribe :) Follow me on Twitter: / thomas_oliverk NestJS is used in v7. Angular is used in v9. Nodejs is used in v12. NPM is used in v6. Frameworks: Backend Framework: https://nestjs.com/ Frontend Framework: https://angular.io/ Tools: postgres Database: https://www.elephantsql.com/ IDE: https://code.visualstudio.com/ API Development, Testing: https://www.postman.com/ Versioning: https://gitlab.com/ Node and NPM: https://nodejs.org/en/ Git and Git Flow: https://git-scm.com/downloads rxjs: https://rxjs-dev.firebaseapp.com/