# leafage-gateway **Repository Path**: gemiman2018/leafage-gateway ## Basic Information - **Project Name**: leafage-gateway - **Description**: 集成spring cloud gateway 和 spring security 提供 websocket 通讯,邮件发送,认证授权功能 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://console.abeille.top - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-09-24 - **Last Updated**: 2021-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Leafage Gateway

Coverage Status Downloads quality coverage

leafage-gateway 是leafage的网关服务、所有后台服务接口都只能通过网关进行访问,它包含两部分: 查看当前依赖最新版本[leafage-starter-parent](https://github.com/little3201/leafage-starter-parent) 了解更过关于 [leafage-basic](https://github.com/little3201/leafage-basic) 更多信息; - 路由网关: 基于spring cloud gateway,进行api请求的转发,目前会路由到leafage-basic模块的两个后台服务,assets和hypervisor; - 安全保护: 整合spring security, 实现了表单登录的功能,因为前后端分离,所以对登录的基本配置进行了一些修改,本项目中没有使用通常其他项目中使用的jwt来做,原因有: 1. 前端都是基于浏览器访问,可以使用cookie,并且实现了csrf防御,且基于nginx和gateway双重请求的保护规则,安全可靠,且简单实用; 2. jwt这个东西太重了,而且很不安全,因为安全原因,不会将用户username之外的任何信息放进token, 所以单单为了username这个而在请求中每次请求都要传输,解析token那么长的信息,费时、浪费资源; 3. 如果使用jwt那为了实现退出,需要做很多事情,然而简单的一个登录,退出,没有必要引入更多的工具或者服务; #### 目标功能 - [x] api路由 - [x] 登录 - [x] 注册 - [x] 邮件 - [x] web socket功能 - [ ] 权限检查 #### 核心依赖 | 依赖 | 说明 | |:-------------------------------:|:-------------------------:| | Spring Cloud Gateway | 基础框架 | | Spring Security | 安全认证 |