mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2026-04-21 10:34:28 +08:00
update 优化 客户端管理 增加白名单路径和白名单IP功能 可限制客户端能访问的具体路径与可访问的具体IP地址
This commit is contained in:
@@ -1211,6 +1211,8 @@ create table sys_client (
|
||||
client_secret varchar2(255) default null,
|
||||
grant_type varchar2(255) default null,
|
||||
device_type varchar2(32) default null,
|
||||
access_path varchar2(2000) default null,
|
||||
ip_whitelist varchar2(1000) default null,
|
||||
active_timeout number(11) default 1800,
|
||||
timeout number(11) default 604800,
|
||||
status char(1) default '0',
|
||||
@@ -1231,6 +1233,8 @@ comment on column sys_client.client_key is '客户端key';
|
||||
comment on column sys_client.client_secret is '客户端秘钥';
|
||||
comment on column sys_client.grant_type is '授权类型';
|
||||
comment on column sys_client.device_type is '设备类型';
|
||||
comment on column sys_client.access_path is '允许访问路径';
|
||||
comment on column sys_client.ip_whitelist is 'IP白名单';
|
||||
comment on column sys_client.active_timeout is 'token活跃超时时间';
|
||||
comment on column sys_client.timeout is 'token固定超时';
|
||||
comment on column sys_client.status is '状态(0正常 1停用)';
|
||||
@@ -1241,8 +1245,8 @@ comment on column sys_client.create_time is '创建时间';
|
||||
comment on column sys_client.update_by is '更新者';
|
||||
comment on column sys_client.update_time is '更新时间';
|
||||
|
||||
insert into sys_client values (1762000000000000001, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate, 1761100000000000001, sysdate);
|
||||
insert into sys_client values (1762000000000000002, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'android', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate, 1761100000000000001, sysdate);
|
||||
insert into sys_client values (1762000000000000001, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', null, null, 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate, 1761100000000000001, sysdate);
|
||||
insert into sys_client values (1762000000000000002, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'android', '/app/**', null, 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate, 1761100000000000001, sysdate);
|
||||
|
||||
create table test_demo (
|
||||
id number(20) not null,
|
||||
|
||||
@@ -1206,6 +1206,8 @@ create table sys_client (
|
||||
client_secret varchar(255) default ''::varchar,
|
||||
grant_type varchar(255) default ''::varchar,
|
||||
device_type varchar(32) default ''::varchar,
|
||||
access_path varchar(2000) default ''::varchar,
|
||||
ip_whitelist varchar(1000) default ''::varchar,
|
||||
active_timeout int4 default 1800,
|
||||
timeout int4 default 604800,
|
||||
status char(1) default '0'::bpchar,
|
||||
@@ -1225,6 +1227,8 @@ comment on column sys_client.client_key is '客户端key';
|
||||
comment on column sys_client.client_secret is '客户端秘钥';
|
||||
comment on column sys_client.grant_type is '授权类型';
|
||||
comment on column sys_client.device_type is '设备类型';
|
||||
comment on column sys_client.access_path is '允许访问路径';
|
||||
comment on column sys_client.ip_whitelist is 'IP白名单';
|
||||
comment on column sys_client.active_timeout is 'token活跃超时时间';
|
||||
comment on column sys_client.timeout is 'token固定超时';
|
||||
comment on column sys_client.status is '状态(0正常 1停用)';
|
||||
@@ -1235,8 +1239,8 @@ comment on column sys_client.create_time is '创建时间';
|
||||
comment on column sys_client.update_by is '更新者';
|
||||
comment on column sys_client.update_time is '更新时间';
|
||||
|
||||
insert into sys_client values (1762000000000000001, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, now(), 1761100000000000001, now());
|
||||
insert into sys_client values (1762000000000000002, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'android', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, now(), 1761100000000000001, now());
|
||||
insert into sys_client values (1762000000000000001, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', '', '', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, now(), 1761100000000000001, now());
|
||||
insert into sys_client values (1762000000000000002, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'android', '/app/**', '', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, now(), 1761100000000000001, now());
|
||||
|
||||
create table if not exists test_demo
|
||||
(
|
||||
|
||||
@@ -852,6 +852,8 @@ create table sys_client (
|
||||
client_secret varchar(255) default null comment '客户端秘钥',
|
||||
grant_type varchar(255) default null comment '授权类型',
|
||||
device_type varchar(32) default null comment '设备类型',
|
||||
access_path varchar(2000) default null comment '允许访问路径',
|
||||
ip_whitelist varchar(1000) default null comment 'IP白名单',
|
||||
active_timeout int(11) default 1800 comment 'token活跃超时时间',
|
||||
timeout int(11) default 604800 comment 'token固定超时',
|
||||
status char(1) default '0' comment '状态(0正常 1停用)',
|
||||
@@ -864,8 +866,8 @@ create table sys_client (
|
||||
primary key (id)
|
||||
) engine=innodb comment='系统授权表';
|
||||
|
||||
insert into sys_client values (1762000000000000001, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate(), 1761100000000000001, sysdate());
|
||||
insert into sys_client values (1762000000000000002, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'android', 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate(), 1761100000000000001, sysdate());
|
||||
insert into sys_client values (1762000000000000001, 'e5cd7e4891bf95d1d19206ce24a7b32e', 'pc', 'pc123', 'password,social', 'pc', null, null, 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate(), 1761100000000000001, sysdate());
|
||||
insert into sys_client values (1762000000000000002, '428a8310cd442757ae699df5d894f051', 'app', 'app123', 'password,sms,social', 'android', '/app/**', null, 1800, 604800, 0, 0, 1761000000000000103, 1761100000000000001, sysdate(), 1761100000000000001, sysdate());
|
||||
|
||||
|
||||
CREATE TABLE test_demo
|
||||
|
||||
@@ -3060,6 +3060,8 @@ CREATE TABLE sys_client
|
||||
client_secret nvarchar(255) DEFAULT '' NULL,
|
||||
grant_type nvarchar(255) DEFAULT '' NULL,
|
||||
device_type nvarchar(32) DEFAULT '' NULL,
|
||||
access_path nvarchar(2000) DEFAULT '' NULL,
|
||||
ip_whitelist nvarchar(1000) DEFAULT '' NULL,
|
||||
active_timeout int DEFAULT ((1800)) NULL,
|
||||
timeout int DEFAULT ((604800)) NULL,
|
||||
status nchar(1) DEFAULT ('0') NULL,
|
||||
@@ -3112,6 +3114,18 @@ EXEC sp_addextendedproperty
|
||||
'TABLE', N'sys_client',
|
||||
'COLUMN', N'device_type'
|
||||
GO
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'允许访问路径',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_client',
|
||||
'COLUMN', N'access_path'
|
||||
GO
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'IP白名单',
|
||||
'SCHEMA', N'dbo',
|
||||
'TABLE', N'sys_client',
|
||||
'COLUMN', N'ip_whitelist'
|
||||
GO
|
||||
EXEC sp_addextendedproperty
|
||||
'MS_Description', N'token活跃超时时间',
|
||||
'SCHEMA', N'dbo',
|
||||
@@ -3172,9 +3186,9 @@ EXEC sp_addextendedproperty
|
||||
'TABLE', N'sys_client'
|
||||
GO
|
||||
|
||||
INSERT INTO sys_client VALUES (1762000000000000001, N'e5cd7e4891bf95d1d19206ce24a7b32e', N'pc', N'pc123', N'password,social', N'pc', 1800, 604800, N'0', N'0', 1761000000000000103, 1761100000000000001, getdate(), 1761100000000000001, getdate());
|
||||
INSERT INTO sys_client VALUES (1762000000000000001, N'e5cd7e4891bf95d1d19206ce24a7b32e', N'pc', N'pc123', N'password,social', N'pc', N'', N'', 1800, 604800, N'0', N'0', 1761000000000000103, 1761100000000000001, getdate(), 1761100000000000001, getdate());
|
||||
GO
|
||||
INSERT INTO sys_client VALUES (1762000000000000002, N'428a8310cd442757ae699df5d894f051', N'app', N'app123', N'password,sms,social', N'android', 1800, 604800, N'0', N'0', 1761000000000000103, 1761100000000000001, getdate(), 1761100000000000001, getdate());
|
||||
INSERT INTO sys_client VALUES (1762000000000000002, N'428a8310cd442757ae699df5d894f051', N'app', N'app123', N'password,sms,social', N'android', N'/app/**', N'', 1800, 604800, N'0', N'0', 1761000000000000103, 1761100000000000001, getdate(), 1761100000000000001, getdate());
|
||||
GO
|
||||
|
||||
CREATE TABLE test_demo
|
||||
|
||||
Reference in New Issue
Block a user