-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathplugin.xml
76 lines (71 loc) · 3.32 KB
/
plugin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<item id="name">OAuth2Server</item>
<item id="version">1.0.0</item>
<item id="author">Jimmy</item>
<item id="date">2016-5-16</item>
<item id="lastmodified">2017-07-14</item>
<item id="copyright"></item>
<item id="tabindex">2</item>
<item id="tips">提供基于UC Server的OAuth2 服务端机制;应用管理基于ucserver自带机制</item>
<item id="lang">
<item id="plugin_oauth2">OAuth2Server</item>
<item id="oauth2_app_list_tips">与系统自带应用管理集成,为方便插件维护升级,此界面只包含OAuth独有功能</item>
<item id="oauth2_app_id">Client ID</item>
<item id="oauth2_app_key">Client Secret</item>
<item id="oauth2_app_user">所属用户</item>
<item id="oauth2_app_edit_normal">编辑基本信息</item>
<item id="oauth2_app_edit_oauth">编辑OAuth信息</item>
<item id="oauth2_app_is_mobile">是否移动应用</item>
<item id="oauth2_app_is_mobile_comment">选否代表普通Web应用,选是代表移动应用无需填写回跳地址</item>
<item id="oauth2_app_redirect_uri">Redirect Uri</item>
<item id="oauth2_app_redirect_uri_comment">Web应用需要填写用户完成授权后回跳页面地址</item>
</item>
<item id="install"><![CDATA[
CREATE TABLE uc_oauth_users (
`username` varchar(255) NOT NULL,
`password` varchar(2000) DEFAULT NULL,
`first_name` varchar(255) DEFAULT NULL,
`last_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE uc_oauth_authorization_codes (
`authorization_code` varchar(40) NOT NULL,
`client_id` varchar(80) NOT NULL,
`user_id` varchar(255) DEFAULT NULL,
`redirect_uri` varchar(2000) NOT NULL,
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`scope` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`authorization_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE uc_oauth_access_tokens (
`access_token` varchar(40) NOT NULL,
`client_id` varchar(80) NOT NULL,
`user_id` varchar(255) DEFAULT NULL,
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`scope` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`access_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE uc_oauth_clients (
`client_id` varchar(80) NOT NULL,
`client_secret` varchar(80) NOT NULL,
`redirect_uri` varchar(2000) NOT NULL,
PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE uc_oauth_refresh_tokens (
`refresh_token` varchar(40) NOT NULL,
`client_id` varchar(80) NOT NULL,
`user_id` varchar(255) DEFAULT NULL,
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`scope` varchar(2000) DEFAULT NULL,
PRIMARY KEY (`refresh_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE uc_applications
ADD COLUMN `redirect_uri` VARCHAR(2000) NOT NULL DEFAULT '' AFTER `allowips`,
ADD COLUMN `is_mobile` TINYINT(1) NOT NULL DEFAULT 0 AFTER `redirect_uri`,
ADD COLUMN `is_deleted` TINYINT(1) NOT NULL DEFAULT 0 AFTER `is_mobile`,
ADD COLUMN `scope` VARCHAR(200) NOT NULL DEFAULT '' AFTER `is_deleted`,
ADD COLUMN `user_id` INT NOT NULL DEFAULT 0 AFTER `scope`,
ADD COLUMN `grant_types` VARCHAR(200) NOT NULL DEFAULT '' AFTER `user_id`;
]]></item>
</root>