From 0f754f8c7b161f80c229cfcbbaefbfc30f493150 Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Fri, 8 Mar 2024 02:25:08 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20sq?= =?UTF-8?q?l=20=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../administrator/sql/install.mysql.utf8.sql | 66 +++++++++++++++---- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/com_oauthserver/administrator/sql/install.mysql.utf8.sql b/com_oauthserver/administrator/sql/install.mysql.utf8.sql index b74be71..c543162 100644 --- a/com_oauthserver/administrator/sql/install.mysql.utf8.sql +++ b/com_oauthserver/administrator/sql/install.mysql.utf8.sql @@ -1,15 +1,57 @@ -CREATE TABLE IF NOT EXISTS `#__webmasterskaya_oauthserver_clients` +create table if not exists `#__webmasterskaya_oauthserver_access_tokens` ( - id int unsigned auto_increment, - name varchar(150) not null, - identifier varchar(255) not null, - secret varchar(255) null, + id int auto_increment + primary key, + identifier varchar(80) not null, + expiry datetime not null, + user_id int null, + scopes text null, + client_id int not null, + revoked tinyint(1) default 0 not null, + constraint oauthserver_access_tokens_uk_1 + unique (identifier) +); + +create table `#__webmasterskaya_oauthserver_authorization_codes` +( + id int auto_increment + primary key, + identifier varchar(80) not null, + expiry datetime not null, + user_id int null, + scopes text null, + revoked tinyint(1) default 0 not null, + client_id int not null, + constraint oauthserver_authorization_codes_uk_1 + unique (identifier) +); + +create table `#__webmasterskaya_oauthserver_clients` +( + id int auto_increment + primary key, + identifier varchar(32) not null, + name varchar(128) not null, + secret varchar(128) null, + redirect_uris longtext null, + grants longtext null, + scopes longtext null, + active tinyint default 1 not null, public tinyint default 0 not null, - redirect_uri varchar(255) null, allow_plain_text_pkce tinyint default 1 not null, - PRIMARY KEY (`id`), - UNIQUE KEY `secret` (`identifier`, `secret`), - UNIQUE KEY `identifier` (`identifier`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - DEFAULT COLLATE = utf8mb4_unicode_ci; \ No newline at end of file + constraint oauthserver_clients_uk_1 + unique (identifier) +); + +create table `#__webmasterskaya_oauthserver_refresh_tokens` +( + id int auto_increment + primary key, + identifier varchar(80) not null, + expiry datetime not null, + revoked tinyint(1) default 0 not null, + access_token_id int null, + constraint oauthserver_refresh_tokens_uk_2 + unique (identifier) +); +