From aa208a2d30aa64458c636b35a143e7c48ddd0311 Mon Sep 17 00:00:00 2001 From: Steve Riesenberg Date: Wed, 30 Jun 2021 13:05:10 -0500 Subject: [PATCH] Add correct script for testing JdbcOAuth2AuthorizationService --- ...om-oauth2-authorization-consent-schema.sql | 6 ----- .../custom-oauth2-authorization-schema.sql | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) delete mode 100644 oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-consent-schema.sql create mode 100644 oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-schema.sql diff --git a/oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-consent-schema.sql b/oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-consent-schema.sql deleted file mode 100644 index 3020828a..00000000 --- a/oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-consent-schema.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE oauth2_authorization_consent ( - registered_client_id varchar(100) NOT NULL, - principal_name varchar(200) NOT NULL, - authorities varchar(1000) NOT NULL, - PRIMARY KEY (registered_client_id, principal_name) -); diff --git a/oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-schema.sql b/oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-schema.sql new file mode 100644 index 00000000..bea26dfa --- /dev/null +++ b/oauth2-authorization-server/src/test/resources/org/springframework/security/oauth2/server/authorization/custom-oauth2-authorization-schema.sql @@ -0,0 +1,27 @@ +CREATE TABLE oauth2Authorization ( + id varchar(100) NOT NULL, + registeredClientId varchar(100) NOT NULL, + principalName varchar(200) NOT NULL, + authorizationGrantType varchar(100) NOT NULL, + attributes varchar(4000) DEFAULT NULL, + state varchar(1000) DEFAULT NULL, + authorizationCodeValue varchar(1000) DEFAULT NULL, + authorizationCodeIssuedAt timestamp DEFAULT NULL, + authorizationCodeExpiresAt timestamp DEFAULT NULL, + authorizationCodeMetadata varchar(1000) DEFAULT NULL, + accessTokenValue varchar(1000) DEFAULT NULL, + accessTokenIssuedAt timestamp DEFAULT NULL, + accessTokenExpiresAt timestamp DEFAULT NULL, + accessTokenMetadata varchar(1000) DEFAULT NULL, + accessTokenType varchar(100) DEFAULT NULL, + accessTokenScopes varchar(1000) DEFAULT NULL, + oidcIdTokenValue varchar(1000) DEFAULT NULL, + oidcIdTokenIssuedAt timestamp DEFAULT NULL, + oidcIdTokenExpiresAt timestamp DEFAULT NULL, + oidcIdTokenMetadata varchar(1000) DEFAULT NULL, + refreshTokenValue varchar(1000) DEFAULT NULL, + refreshTokenIssuedAt timestamp DEFAULT NULL, + refreshTokenExpiresAt timestamp DEFAULT NULL, + refreshTokenMetadata varchar(1000) DEFAULT NULL, + PRIMARY KEY (id) +);