0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-06 20:40:08 -05:00
logto/packages/schemas/tables/sso_connectors.sql
simeng-li 8e07825f17
refactor(schemas): add new sso_connector_id column to the users_sso_identities table (#4843)
* refactor(schemas): add new sso_connector_id column to the users_sso_identities table

add new sso_connector_id column to the users_sso_identities table

* refactor(schemas): add new sso_connector_id row to the users_sso_identities table

add new sso_connector_id row to the users_sso_identities table

* fix(schemas): fix alteration script

fix alteration script

* fix(schemas): fix alteration script

fix alteration script

* feat(core): add single sign on authentication api (#4814)

* feat(core): add single sign on authentication api

add single sign on authentication api

* feat(core): finish up the single sign on authentication api

finish up the single sign on authentication api

* chore(core): fix typo

fix typo

* test(core): add ut for getSsoAuthorizationUrl method

add ut for getSsoAuthorizationUrl method

* fix(core): fix the userSsoIdentities sql

fix the userSsoIdentities sql

* test(core): add unit tests

add unit tests

* fix(core): saml sso rebase fix

saml sso rebase fix

* fix(core): fix rebase issue
 fix rebase issue

* feat(core): add sso email guard to interaction endpoint (#4838)

* feat(core): add sso email guard to interaction endpoint

add sso email guard to interaction endpoint

* fix(core): fix unit tests

fix unit tests

* chore(core): split files

split files
2023-11-08 08:55:45 +00:00

30 lines
1.3 KiB
SQL

/* init_order = 1 */
create table sso_connectors (
tenant_id varchar(21) not null
references tenants (id) on update cascade on delete cascade,
/** The globally unique identifier of the SSO connector. */
id varchar(128) not null,
/** The connector factory name of the SSO provider. */
provider_name varchar(128) not null,
/** The name of the SSO provider for display. */
connector_name varchar(128) not null,
/** The connector configuration. Different schemas for different provide type */
config jsonb /* @use JsonObject */ not null default '{}'::jsonb,
/** The SSO email domains. */
domains jsonb /* @use SsoDomains */ not null default '[]'::jsonb,
/** The SSO branding. */
branding jsonb /* @use SsoBranding */ not null default '{}'::jsonb,
/** Determines whether to synchronize the user's profile on each login. */
sync_profile boolean not null default FALSE,
/** Determines whether SSO is the restricted sign-in method for users with the SSO registered email domains */
sso_only boolean not null default FALSE,
/** When the SSO connector was created. */
created_at timestamptz not null default(now()),
primary key (id)
);
create index sso_connectors__id
on sso_connectors (tenant_id, id);
create index sso_connectors__id__provider_name
on sso_connectors (tenant_id, id, provider_name);