|
所在平台: Udemy |
课程主页: https://www.udemy.com/course/practical-bootcamp-jwt-authentication-with-java-springboot/
课程评论:没有评论
**课程名称:** Spring Boot 3 结合 JWT 进行认证与授权 (2025版) **课程概述:** 本课程已于2025年更新,根据最新的 Spring Security 功能和 JWT 规范,为您讲解如何在任何 Spring Boot 应用中实现基于角色的认证与授权。您将学习如何开发 CRUD API 并利用 JWT (JSON Web Token) 进行安全加固。 JWT 是一种用于微服务架构中 API 安全的标准,无论您的 API 是用 Node.js、Python、.NET 还是 Java 和 Spring Boot 构建,都可以使用它来保护。本课程专注于使用 Java 和 Spring Boot 构建 API,并结合 JWT 和 Spring Security 进行安全防护,并将贯穿行业最佳实践和标准。 **课程内容概览:** * **基础概念学习:** * 什么是认证 (Authentication) * 什么是授权 (Authorization) * 保护 RESTful API 的重要性 * 什么是 JWT (JSON Web Token) * JWT 的各种组成部分和术语 * JWT 的工作流程及应用场景图解 * **实践操作与实现:** * 从零开始创建 Spring Boot 项目 * 添加所需的 Maven 依赖 * 在 GitHub 上设置项目并遵循持续集成 (CI) 流程 * 数据库设置与连接配置 * 创建 Hibernate 实体类 * 创建 Controller 类 * 开发第一个 API 接口 * 配置 JWT 和 Spring Security * 创建安全相关的类,如配置类、过滤器、服务类 * 配置 JWT 的密钥和过期时间 * 配置允许访问和禁止访问的 API 端点 * 实现用户注册和登录 API * 创建基于角色的类 * 根据角色限制用户功能 * 设置 GitHub 以使用 Token 推送代码 * 创建 JWT Token * 使用 JWT Token 调用受保护的 API * 使用 Postman 测试 API * 实现 JWT Token 有效性校验机制 * 从 JWT Token 中提取用户信息和角色信息 * 开发 CRUD API 并使用 JWT 进行保护 * 提供完整的源代码
This course has been updated in 2025 as per new Spring Security Features and JWT Specification to implement Role Based Authentication & Authorization of any SpringBoot based Application.Develop CRUD API and secure it with JWTJWT(Json web token) is a standard for securing API's in a Microservices architecture, using this standard we can secure API's built in any technology like Nodejs, Python,.NET etc but in this course we will building API's using Java and SpringBoot and than we will be securing them using JWT and Spring security, we will also use all the industry best practices and standards along the way.We will start with learning concepts like:What is AuthenticationWhat is AuthorizationImportance of securing RESTful API'sWhat is JWT(Json Web Token)Various components and terminology associated with JWTWorkflow and a diagramatic use case of using JWTThan we will move on to the actual handson and implementation of JWT in our Springboot project by following below steps:Create springboot project from scratchAdding required maven dependenciesSetup project in Github and follow continous integration processSetting up database and establishing connectionCreate our Hibernate entity classesCreate our controller classCreate the first APIStart configuring JWT and Spring securityCreate security related classes like configuartion, filters, serviceMaking the secret and expiration time configurableConfiguring the allowed and not allowed endpointsCreating user registration and login endpointsCreating Role based classesCreate multiple rolesRestrict users to functionalities based on RolesSetting up github to push code with tokenCreating a JWT token Using the JWT token to call a secured APIUsing Postman to test our API'sMechanism to check if a particular JWT token is valid or notExtracting user information and role information from JWT tokenDevelop CRUD API and secure it with JWTComplete source code