Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
程序猿小郑
microservices-platform
提交
0910daba
microservices-platform
项目概览
程序猿小郑
/
microservices-platform
与 Fork 源项目一致
Fork自
zlt2000 / microservices-platform
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
microservices-platform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0910daba
编写于
8月 06, 2019
作者:
zlt2000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加应用名称字段
上级
2a6ba6a4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
17 addition
and
6 deletion
+17
-6
zlt-doc/sql/oauth-center.sql
zlt-doc/sql/oauth-center.sql
+5
-5
zlt-uaa/src/main/java/com/central/oauth/model/Client.java
zlt-uaa/src/main/java/com/central/oauth/model/Client.java
+4
-0
zlt-uaa/src/main/resources/mapper/ClientMapper.xml
zlt-uaa/src/main/resources/mapper/ClientMapper.xml
+1
-1
zlt-web/back-web/src/main/resources/static/pages/attestation/app.html
...-web/src/main/resources/static/pages/attestation/app.html
+7
-0
未找到文件。
zlt-doc/sql/oauth-center.sql
浏览文件 @
0910daba
...
...
@@ -7,7 +7,7 @@ Use `oauth-center`;
DROP
TABLE
IF
EXISTS
`oauth_client_details`
;
CREATE
TABLE
`oauth_client_details`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`client_id`
varchar
(
48
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'应用标识'
,
`client_id`
varchar
(
32
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
COMMENT
'应用标识'
,
`resource_ids`
varchar
(
256
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'资源限定串(逗号分割)'
,
`client_secret`
varchar
(
256
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'应用密钥(bcyt) 加密'
,
`client_secret_str`
varchar
(
256
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'应用密钥(明文)'
,
...
...
@@ -21,13 +21,13 @@ CREATE TABLE `oauth_client_details` (
`autoapprove`
char
(
4
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NOT
NULL
DEFAULT
'true'
COMMENT
'是否自动授权 是-true'
,
`create_time`
datetime
(
0
)
NULL
DEFAULT
NULL
,
`update_time`
datetime
(
0
)
NULL
DEFAULT
NULL
,
`client_name`
varchar
(
128
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
DEFAULT
''
COMMENT
'应用名称'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
11
CHARACTER
SET
=
utf8
COLLATE
=
utf8_general_ci
ROW_FORMAT
=
Dynamic
;
-- ----------------------------
-- Records of oauth_client_details
-- ----------------------------
INSERT
INTO
`oauth_client_details`
VALUES
(
1
,
'app'
,
NULL
,
'$2a$10$i3F515wEDiB4Gvj9ym9Prui0dasRttEUQ9ink4Wpgb4zEDCAlV8zO'
,
'app'
,
'app'
,
'password,refresh_token'
,
NULL
,
NULL
,
3600
,
NULL
,
'{}'
,
'true'
,
NULL
,
NULL
);
INSERT
INTO
`oauth_client_details`
VALUES
(
2
,
'mobile'
,
'mobile,test'
,
'$2a$10$ULxRssv/4NWOc388lZFbyus3IFfsbcpG/BZOq4TRxDhsx5HHIR7Jm'
,
'mobile'
,
'all'
,
'password,refresh_token'
,
NULL
,
NULL
,
3600
,
NULL
,
'{}'
,
'true'
,
NULL
,
NULL
);
INSERT
INTO
`oauth_client_details`
VALUES
(
4
,
'webApp'
,
NULL
,
'$2a$10$06msMGYRH8nrm4iVnKFNKOoddB8wOwymVhbUzw/d3ZixD7Nq8ot72'
,
'webApp'
,
'app'
,
'authorization_code,password,refresh_token,client_credentials'
,
NULL
,
NULL
,
3600
,
NULL
,
'{}'
,
'true'
,
NULL
,
NULL
);
INSERT
INTO
`oauth_client_details`
VALUES
(
11
,
'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'
);
\ No newline at end of file
INSERT
INTO
`oauth_client_details`
VALUES
(
1
,
'app'
,
NULL
,
'$2a$10$i3F515wEDiB4Gvj9ym9Prui0dasRttEUQ9ink4Wpgb4zEDCAlV8zO'
,
'app'
,
'app'
,
'password,refresh_token'
,
NULL
,
NULL
,
3600
,
NULL
,
'{}'
,
'true'
,
NULL
,
NULL
,
'移动端'
);
INSERT
INTO
`oauth_client_details`
VALUES
(
2
,
'webApp'
,
NULL
,
'$2a$10$06msMGYRH8nrm4iVnKFNKOoddB8wOwymVhbUzw/d3ZixD7Nq8ot72'
,
'webApp'
,
'app'
,
'authorization_code,password,refresh_token,client_credentials'
,
NULL
,
NULL
,
3600
,
NULL
,
'{}'
,
'true'
,
NULL
,
NULL
,
'pc端'
);
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'
,
'第三方应用'
);
\ No newline at end of file
zlt-uaa/src/main/java/com/central/oauth/model/Client.java
浏览文件 @
0910daba
...
...
@@ -15,6 +15,10 @@ import lombok.EqualsAndHashCode;
public
class
Client
extends
SuperEntity
{
private
static
final
long
serialVersionUID
=
-
8185413579135897885L
;
private
String
clientId
;
/**
* 应用名称
*/
private
String
clientName
;
private
String
resourceIds
=
""
;
private
String
clientSecret
;
private
String
clientSecretStr
;
...
...
zlt-uaa/src/main/resources/mapper/ClientMapper.xml
浏览文件 @
0910daba
...
...
@@ -46,7 +46,7 @@
</sql>
<select
id=
"findList"
resultType=
"com.central.oauth.model.Client"
>
select id , client_id , resource_ids ,
select id , client_id
, client_name
, resource_ids ,
client_secret ,
client_secret_str ,
web_server_redirect_uri from oauth_client_details t
...
...
zlt-web/back-web/src/main/resources/static/pages/attestation/app.html
浏览文件 @
0910daba
...
...
@@ -35,6 +35,12 @@
lay
-
verify
=
"
required
"
required
/>
<
/div>
<
/div>
<
div
class
=
"
layui-form-item
"
>
<
label
class
=
"
layui-form-label
"
>
应用名称
<
/label>
<
div
class
=
"
layui-input-block
"
>
<
input
name
=
"
clientName
"
placeholder
=
"
请输入应用名称
"
type
=
"
text
"
class
=
"
layui-input
"
maxlength
=
"
20
"
/>
<
/div>
<
/div>
<
div
class
=
"
layui-form-item
"
>
<
label
class
=
"
layui-form-label
"
>
应用密钥
<
/label>
<
div
class
=
"
layui-input-block
"
>
...
...
@@ -76,6 +82,7 @@
cols
:
[[
{
type
:
'
numbers
'
},
{
field
:
'
clientId
'
,
width
:
180
,
sort
:
true
,
title
:
'
应用标识
'
},
{
field
:
'
clientName
'
,
width
:
200
,
sort
:
true
,
title
:
'
应用名称
'
},
{
field
:
'
clientSecretStr
'
,
width
:
180
,
sort
:
true
,
title
:
'
应用密钥
'
},
{
field
:
'
webServerRedirectUri
'
,
sort
:
true
,
title
:
'
回调地址
'
},
{
field
:
'
authorizedGrantTypes
'
,
sort
:
true
,
title
:
'
oauth授权方式
'
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录