missed one

pull/263/head
Justin Richer 2012-12-11 12:18:51 -05:00
parent 33ceedb283
commit bcfa37040e
2 changed files with 7 additions and 7 deletions

View File

@ -10,8 +10,8 @@ START TRANSACTION;
-- Insert client information into the temporary tables. To add clients to the HSQL database, edit things here.
--
INSERT INTO client_details_TEMP (client_id, client_secret, application_name, allow_refresh, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds) VALUES
('client', 'secret', 'Test Client', true, false, null, 3600, 600);
INSERT INTO client_details_TEMP (client_id, client_secret, client_name, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds) VALUES
('client', 'secret', 'Test Client', false, null, 3600, 600);
INSERT INTO client_scope_TEMP (owner_id, scope) VALUES
('client', 'openid'),
@ -28,17 +28,18 @@ INSERT INTO redirect_uri_TEMP (owner_id, redirect_uri) VALUES
INSERT INTO authorized_grant_type_TEMP (owner_id, authorized_grant_type) VALUES
('client', 'authorization_code'),
('client', 'urn:ietf:params:oauth:grant_type:redelegate'),
('client', 'implicit');
('client', 'implicit'),
('client', 'refresh_token');
--
-- Merge the temporary clients safely into the database. This is a two-step process to keep clients from being created on every startup with a persistent store.
--
MERGE INTO client_details
USING (SELECT client_id, client_secret, application_name, allow_refresh, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds FROM client_details_TEMP) AS vals(client_id, client_secret, application_name, allow_refresh, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds)
USING (SELECT client_id, client_secret, client_name, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds FROM client_details_TEMP) AS vals(client_id, client_secret, client_name, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds)
ON vals.client_id = client_details.client_id
WHEN NOT MATCHED THEN
INSERT (client_id, client_secret, application_name, allow_refresh, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds) VALUES(client_id, client_secret, application_name, allow_refresh, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds);
INSERT (client_id, client_secret, client_name, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds) VALUES(client_id, client_secret, client_name, dynamically_registered, refresh_token_validity_seconds, access_token_validity_seconds, id_token_validity_seconds);
MERGE INTO client_scope
USING (SELECT id, scope FROM client_scope_TEMP, client_details WHERE client_details.client_id = client_scope_TEMP.owner_id) AS vals(id, scope)

View File

@ -37,7 +37,6 @@ CREATE TEMPORARY TABLE IF NOT EXISTS user_info_TEMP (
CREATE TEMPORARY TABLE IF NOT EXISTS client_details_TEMP (
client_description VARCHAR(256),
allow_refresh BOOLEAN,
dynamically_registered BOOLEAN,
id_token_validity_seconds BIGINT,
@ -46,7 +45,7 @@ CREATE TEMPORARY TABLE IF NOT EXISTS client_details_TEMP (
access_token_validity_seconds BIGINT,
refresh_token_validity_seconds BIGINT,
application_name VARCHAR(256)
client_name VARCHAR(256)
);
CREATE TEMPORARY TABLE IF NOT EXISTS client_scope_TEMP (