From bcfa37040ece516c757c689a2551c5ffd590713f Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Tue, 11 Dec 2012 12:18:51 -0500 Subject: [PATCH] missed one --- .../src/main/resources/db/clients.sql | 11 ++++++----- .../main/resources/db/tables/loading_temp_tables.sql | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openid-connect-server/src/main/resources/db/clients.sql b/openid-connect-server/src/main/resources/db/clients.sql index 81b46468c..ac542a4d2 100644 --- a/openid-connect-server/src/main/resources/db/clients.sql +++ b/openid-connect-server/src/main/resources/db/clients.sql @@ -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) diff --git a/openid-connect-server/src/main/resources/db/tables/loading_temp_tables.sql b/openid-connect-server/src/main/resources/db/tables/loading_temp_tables.sql index dccadffde..00b5fd9a2 100644 --- a/openid-connect-server/src/main/resources/db/tables/loading_temp_tables.sql +++ b/openid-connect-server/src/main/resources/db/tables/loading_temp_tables.sql @@ -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 (