📝 编写文档.swagger 使用说明

This commit is contained in:
冷冷 committed 2018-07-25 13:36:42 +08:00
1 parent 3e71a17d67
commit 440864ff7b
4 files changed
+62 -2

No files matched your search

+2 -2
View File
@@ -18,8 +18,8 @@ https://pig4cloud.com
- 完整的oAuth 流程,资源服务器控制权限
- 去除了部分对于开发不友好的中间件
### 部署说明
[部署说明](doc/deploy.md)
### 使用说明
[目录](doc/md/catalog.md)
## 协议和授权
+2
View File
@@ -0,0 +1,2 @@
[部署说明](deploy.md)
[swagger使用](swagger.md)
View File
File renamed without changes.
+58
View File
@@ -0,0 +1,58 @@
# 如何在pigx Swagger中OAuth2.0 授权
## 增加客户端
默认对所有终端进行验证码校验,但是swagger 模拟的时候不需要。
- 通过界面的形式
![](http://obq1lvsd9.bkt.clouddn.com/20180725132807.png)
- 直接操作**sys_oauth_client_details**表
```sql
INSERT INTO `pigx`.`sys_oauth_client_details` (
`authorities`,
`authorized_grant_types`,
`web_server_redirect_uri`,
`scope`,
`additional_information`,
`autoapprove`,
`resource_ids`,
`refresh_token_validity`,
`client_secret`,
`client_id`,
`access_token_validity`
)
VALUES
(
NULL,
'password,refresh_token',
NULL,
'server',
NULL,
'true',
NULL,
NULL,
'test',
'test',
NULL
);
```
## 过滤指定客户端
pigx-gateway-dev.yml
```yml
# 不校验验证码终端
ignore:
clients:
- test
```
## 填写客户端信息
![](http://obq1lvsd9.bkt.clouddn.com/20180725133119.png)
![](http://obq1lvsd9.bkt.clouddn.com/20180725133206.png)