Skip to content

Commit c8a9909

Browse files
authored
Merge branch 'master' into dev
2 parents 0e1801e + fa0d663 commit c8a9909

File tree

5 files changed

+84
-3
lines changed

5 files changed

+84
-3
lines changed

zlt-demo/sso-demo/oidc-sso/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ alter table oauth_client_details add support_id_token tinyint(1) DEFAULT 1 COMME
1111
alter table oauth_client_details add id_token_validity int(11) DEFAULT 60 COMMENT 'id_token有效期';
1212

1313
update oauth_client_details set additional_information = '{"LOGOUT_NOTIFY_URL_LIST":"http://127.0.0.1:8082/logoutNotify"}'
14+
, web_server_redirect_uri = 'http://127.0.0.1:8082/callback.html'
1415
where client_id = 'webApp';
1516
```
1617

zlt-demo/sso-demo/oidc-sso/src/main/java/com/sso/demo/controller/ApiController.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public class ApiController {
5050
@Value("${zlt.sso.redirect-uri:}")
5151
private String redirectUri;
5252

53+
@Value("${zlt.sso.scope:}")
54+
private String scope;
55+
5356
@Value("${zlt.sso.access-token-uri:}")
5457
private String accessTokenUri;
5558

@@ -146,7 +149,7 @@ public Map<String, Object> getAccessToken(String code) {
146149
param.add("code", code);
147150
param.add("grant_type", "authorization_code");
148151
param.add("redirect_uri", redirectUri);
149-
param.add("scope", "all");
152+
param.add("scope", scope);
150153
param.add("nonce", this.genNonce());
151154
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(param, headers);
152155
ResponseEntity<Map> response = restTemplate.postForEntity(accessTokenUri, request , Map.class);

zlt-demo/sso-demo/oidc-sso/src/main/resources/bootstrap.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ zlt:
1111
client-secret: webApp
1212
redirect-uri: http://127.0.0.1:8082/callback.html
1313
access-token-uri: http://127.0.0.1:9900/api-uaa/oauth/token
14-
jwt-key-uri: http://127.0.0.1:9900/api-uaa/tokens/key
14+
jwt-key-uri: http://127.0.0.1:9900/api-uaa/tokens/key
15+
scope: app

zlt-doc/sql/oauth-center.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ CREATE TABLE `oauth_client_details` (
3030
-- ----------------------------
3131
-- Records of oauth_client_details
3232
-- ----------------------------
33-
INSERT INTO `oauth_client_details` VALUES (1, 'webApp', NULL, '$2a$10$06msMGYRH8nrm4iVnKFNKOoddB8wOwymVhbUzw/d3ZixD7Nq8ot72', 'webApp', 'app', 'authorization_code,password,refresh_token,client_credentials,implicit,password_code,openId,mobile_password', NULL, NULL, 3600, NULL, '{"LOGOUT_NOTIFY_URL_LIST":"http://127.0.0.1:8082/logoutNotify"}', 'true', NULL, NULL, 'pc端', 1, 60);
33+
INSERT INTO `oauth_client_details` VALUES (1, 'webApp', NULL, '$2a$10$06msMGYRH8nrm4iVnKFNKOoddB8wOwymVhbUzw/d3ZixD7Nq8ot72', 'webApp', 'app', 'authorization_code,password,refresh_token,client_credentials,implicit,password_code,openId,mobile_password', 'http://127.0.0.1:8082/callback.html', NULL, 3600, NULL, '{"LOGOUT_NOTIFY_URL_LIST":"http://127.0.0.1:8082/logoutNotify"}', 'true', NULL, NULL, 'pc端', 1, 60);
3434
INSERT INTO `oauth_client_details` VALUES (2, 'app', NULL, '$2a$10$i3F515wEDiB4Gvj9ym9Prui0dasRttEUQ9ink4Wpgb4zEDCAlV8zO', 'app', 'app', 'authorization_code,password,refresh_token', 'http://127.0.0.1:8081/callback.html', NULL, 3600, NULL, '{"LOGOUT_NOTIFY_URL_LIST":"http://127.0.0.1:8081/logoutNotify"}', 'true', NULL, NULL, '移动端', 1, 60);
3535
INSERT INTO `oauth_client_details` VALUES (3, 'zlt', NULL, '$2a$10$/o.wuORzVcXaezmYVzwYMuoY7qeWXBALwQmkskXD/7C6rqfCyPrna', 'zlt', 'all', 'authorization_code,password,refresh_token,client_credentials', 'http://127.0.0.1:8080/singleLogin', NULL, 3600, 28800, '{}', 'true', '2018-12-27 00:50:30', '2018-12-27 00:50:30', '第三方应用', 1, 60);

zlt-web/react-web/README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Central-Platform UI
2+
3+
本模块是基于`企业级微服务框架`后端 API 所开发的前端项目。
4+
5+
采用[Ant Design Pro](https://pro.ant.design/)框架,基于[UmiJS v3.x](https://v3.umijs.org/)[ProComponents](https://procomponents.ant.design/);
6+
图表采用[Ant Design Charts](https://charts.ant.design/)
7+
8+
## 1.目录说明
9+
考虑到部署方便,集成了SpringBootWeb,目录结构基于Maven规范。
10+
```lua
11+
zlt-web -- 前端一级工程
12+
│ ├─src -- 源码
13+
│ │ ├─main --
14+
│ │ │ ├─frontend -- 前端源码
15+
│ │ │ ├─java -- 后端源码
16+
```
17+
## 2.后端使用说明
18+
模块已集成Maven插件`frontend-maven-plugin`用于编译前端代码
19+
>由于需要安装前端环境并编译前端代码,首次运行需要时间较长
20+
### 打包运行
21+
```bash
22+
mvn package
23+
```
24+
在target目录下生成zlt-web-5.4.0.jar(springboot jar)。
25+
```bash
26+
java -jar zlt-web-5.4.0.jar
27+
```
28+
29+
### IDE中运行
30+
31+
如在本地开发,在运行`SpringBootApplication`前必须先执行
32+
```bash
33+
mvn compile
34+
```
35+
36+
### 配置
37+
前缀:`zlt.ui`
38+
39+
| 配置项 | 类型 | 是否必须 | 默认值 | 说明 |
40+
|--------------|--------|------|-----|-------|
41+
| path-context | String || "/" | 上下文路径 |
42+
43+
## 3.前端使用说明
44+
所有前端代码在`frontend`目录下。
45+
### 环境准备
46+
47+
安装 `node_modules`:
48+
49+
```bash
50+
npm install
51+
```
52+
53+
or
54+
55+
```bash
56+
yarn
57+
```
58+
59+
### 运行项目
60+
61+
```bash
62+
npm start
63+
```
64+
65+
### 编译项目
66+
67+
```bash
68+
npm run build
69+
```
70+
### More
71+
开发参考
72+
* [Ant Design Pro](https://pro.ant.design/) 开箱即用的中台前端/设计解决方案
73+
* [UmiJS v3.x](https://v3.umijs.org/) 可扩展的企业级前端应用框架
74+
* [Ant Design](https://ant.design/index-cn) 基于 Ant Design 设计体系的 React UI 组件库
75+
* [ProComponents](https://procomponents.ant.design/) 基于 Ant Design 设计规范,提供更高程度的抽象,提供更上层的设计规范
76+
* [Ant Design Charts](https://charts.ant.design/) 简单好用的 React 图表库

0 commit comments

Comments
 (0)