oauth2资源服务器
Go to file
2025-01-02 15:38:12 +08:00
cmd feature: 新增oauth2 2025-01-02 15:13:41 +08:00
internal Initial commit 2025-01-02 11:53:35 +08:00
.DS_Store Initial commit 2025-01-02 11:53:35 +08:00
.gitignore Initial commit 2025-01-02 11:53:35 +08:00
go.mod feature: 新增oauth2 2025-01-02 15:13:41 +08:00
go.sum feature: 新增oauth2 2025-01-02 15:13:41 +08:00
Makefile feature: 新增oauth2 2025-01-02 15:13:41 +08:00
README.md feature: 更新项目说明 2025-01-02 15:38:12 +08:00

项目结构

- bin # 可编译的二进制文件, 用于部署到服务器
- cmd
  - api # 业务代码, 处理请求,权限
    - main.go
- internel # 辅助代码, 处理数据库, 数据校验, 发邮件等
- migrations # sql迁移文件
- remote # 配置文件和启动脚本
- go.mod # 项目依赖, 版本号, 模块路径
- Makefile # 自动化处理任务, 审核代码, 生成二进制文件, 执行sql迁移

oauth2-resource-server

项目h5 https://git.leonmin.com/example/oauth2-h5

$ npm install
$ npm run dev

资源服务器 https://git.leonmin.com/example/oauth2-resource-server

$ make run/api # 或者go run ./cmd/api -port=4002

授权服务器 https://git.leonmin.com/example/oauth2-authorize-server

$ make run/api # 或者go run ./cmd/api -port=4001

截图

首页

登录

同意授权

授权数据