mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
2c8343a757
* feat(core): consume IdP initiated session on SSO verification flow Auto consume the IdP initiated SAML SSO session on the SSO sign-in verification flow * test(core): add unit test cases add unit test cases * feat(schemas): add client idp-initiated auth callback url column add client idp-initiated auth callback url column * fix(test): fix ut fix ut
40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
import { sql } from '@silverhand/slonik';
|
|
|
|
import type { AlterationScript } from '../lib/types/alteration.js';
|
|
|
|
const alteration: AlterationScript = {
|
|
up: async (pool) => {
|
|
await pool.query(sql`
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
add column client_idp_initiated_auth_callback_uri text;
|
|
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
add column auto_send_authorization_request boolean not null default false;
|
|
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
drop constraint application_type;
|
|
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
add constraint application_type
|
|
check (check_application_type(default_application_id, 'Traditional', 'SPA'));
|
|
`);
|
|
},
|
|
down: async (pool) => {
|
|
await pool.query(sql`
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
drop constraint application_type;
|
|
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
drop column client_idp_initiated_auth_callback_uri;
|
|
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
drop column auto_send_authorization_request;
|
|
|
|
alter table sso_connector_idp_initiated_auth_configs
|
|
add constraint application_type
|
|
check (check_application_type(default_application_id, 'Traditional'));
|
|
`);
|
|
},
|
|
};
|
|
|
|
export default alteration;
|