oauth2-authorize-server/README.md

45 lines
1.2 KiB
Markdown

## 项目结构
```yaml
- bin # 可编译的二进制文件, 用于部署到服务器
- cmd
- api # 业务代码, 处理请求,权限
- main.go
- internel # 辅助代码, 处理数据库, 数据校验, 发邮件等
- migrations # sql迁移文件
- remote # 配置文件和启动脚本
- go.mod # 项目依赖, 版本号, 模块路径
- Makefile # 自动化处理任务, 审核代码, 生成二进制文件, 执行sql迁移
```
## oauth2-authorize-server
### 项目h5 https://git.leonmin.com/example/oauth2-h5
```bash
$ npm install
$ npm run dev
```
### 资源服务器 https://git.leonmin.com/example/oauth2-resource-server
```bash
$ make run/api # 或者go run ./cmd/api -port=4002
```
### 授权服务器 https://git.leonmin.com/example/oauth2-authorize-server
```bash
$ make run/api # 或者go run ./cmd/api -port=4001
```
### 截图
![首页](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-home.png)
![登录](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-login.png)
![同意授权](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-agree-auth.png)
![授权数据](https://git.leonmin.com/example/assets/raw/branch/master/images/oauth2/oauth2-authorize.png)