[MM-55028] Added OAuthOutgoingConnection store (#25221)
* OAuthOutgoingConnection model * added store * make generated * add missing license headers * fix receiver name * i18n * i18n sorting * update migrations from master * make migrations-extract * update retrylayer tests * replaced sql query with id pagination * fixed flaky tests * missing columns * missing columns on save/update * typo * improved tests * remove enum from mysql colum * add password credentials to store * renamed migrations * model change suggestions * refactor test functionsn * migration typo * refactor store table names * updated sanitize test * oauthoutgoingconnection -> outgoingoauthconnection * signature change * i18n update * granttype typo * uppercase typo * lowercase store name
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8158c0e614
Коммит
b40366dbdf
@@ -228,6 +228,8 @@ channels/db/migrations/mysql/000114_sharedchannelremotes_drop_nextsyncat_descrip
|
||||
channels/db/migrations/mysql/000114_sharedchannelremotes_drop_nextsyncat_description.up.sql
|
||||
channels/db/migrations/mysql/000115_user_reporting_changes.down.sql
|
||||
channels/db/migrations/mysql/000115_user_reporting_changes.up.sql
|
||||
channels/db/migrations/mysql/000116_create_outgoing_oauth_connections.down.sql
|
||||
channels/db/migrations/mysql/000116_create_outgoing_oauth_connections.up.sql
|
||||
channels/db/migrations/postgres/000001_create_teams.down.sql
|
||||
channels/db/migrations/postgres/000001_create_teams.up.sql
|
||||
channels/db/migrations/postgres/000002_create_team_members.down.sql
|
||||
@@ -456,3 +458,5 @@ channels/db/migrations/postgres/000114_sharedchannelremotes_drop_nextsyncat_desc
|
||||
channels/db/migrations/postgres/000114_sharedchannelremotes_drop_nextsyncat_description.up.sql
|
||||
channels/db/migrations/postgres/000115_user_reporting_changes.down.sql
|
||||
channels/db/migrations/postgres/000115_user_reporting_changes.up.sql
|
||||
channels/db/migrations/postgres/000116_create_outgoing_oauth_connections.down.sql
|
||||
channels/db/migrations/postgres/000116_create_outgoing_oauth_connections.up.sql
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DROP TABLE IF EXISTS OutgoingOAuthConnections;
|
||||
@@ -0,0 +1,16 @@
|
||||
CREATE TABLE IF NOT EXISTS OutgoingOAuthConnections (
|
||||
Id varchar(26),
|
||||
Name varchar(64),
|
||||
CreatorId varchar(26) DEFAULT NULL,
|
||||
CreateAt bigint(20) DEFAULT NULL,
|
||||
UpdateAt bigint(20) DEFAULT NULL,
|
||||
ClientId varchar(255),
|
||||
ClientSecret varchar(255),
|
||||
CredentialsUsername varchar(255),
|
||||
CredentialsPassword varchar(255),
|
||||
OAuthTokenURL text,
|
||||
GrantType varchar(32) DEFAULT 'client_credentials',
|
||||
Audiences TEXT,
|
||||
PRIMARY KEY (Id),
|
||||
KEY idx_OutgoingOAuthConnections_name (Name)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
@@ -0,0 +1,3 @@
|
||||
DROP TABLE IF EXISTS outgoingoauthconnections;
|
||||
|
||||
DROP TYPE IF EXISTS outgoingoauthconnections_granttype;
|
||||
@@ -0,0 +1,18 @@
|
||||
CREATE TYPE outgoingoauthconnections_granttype AS ENUM ('client_credentials', 'password');
|
||||
|
||||
CREATE TABLE IF NOT EXISTS outgoingoauthconnections (
|
||||
id varchar(26) PRIMARY KEY,
|
||||
name varchar(64),
|
||||
creatorid VARCHAR(26),
|
||||
createat bigint,
|
||||
updateat bigint,
|
||||
clientid varchar(255),
|
||||
clientsecret varchar(255),
|
||||
credentialsusername varchar(255),
|
||||
credentialspassword varchar(255),
|
||||
oauthtokenurl text,
|
||||
granttype outgoingoauthconnections_granttype DEFAULT 'client_credentials',
|
||||
audiences VARCHAR(1024)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_outgoingoauthconnections_name ON outgoingoauthconnections (name);
|
||||
Ссылка в новой задаче
Block a user