-
Notifications
You must be signed in to change notification settings - Fork 6k
Use LobHandler in JdbcOAuth2AuthorizedClientService #9070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use LobHandler in JdbcOAuth2AuthorizedClientService #9070
Conversation
6542724
to
1c86e74
Compare
@jgrandja could you please take a look at this PR? I'm eager to work with you to get it merged - thank you! |
Apologies for the delay @candrews. I've been very busy with the new Spring Authorization Server. I'll review this early next week. Thanks for your patience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @candrews !
I left some feedback for you. The requested changes are minor so this is close to being merged.
Can you please add Closes gh-9070
at the end of the commit message for the LobHandler
and Issue gh-9070
at the end of the commit message for the Postgres.sql.
Also, please rebase on master.
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Outdated
Show resolved
Hide resolved
.../main/java/org/springframework/security/oauth2/client/JdbcOAuth2AuthorizedClientService.java
Show resolved
Hide resolved
LobHandler provides an abstraction for handling large binary fields and large text fields in specific databases, no matter if represented as simple types or Large OBjects. Its use provides compatibility with many databases eliminating the need for custom OAuth2AuthorizedClientParametersMapper and OAuth2AuthorizedClientRowMapper implementations. Closes spring-projectsgh-9070
…vice Postgres doesn't have a BLOB type, but it does have an equivalent BYTEA type. This approach and naming convention follows the convention established in Spring Session JDBC which has sql for each RDBMS with files names in the pattern *-{dbname}.sql, for example: schema-db2.sql schema-derby.sql schema-h2.sql schema-mysql.sql schema-postgresql.sql See https://github.com/spring-projects/spring-session/tree/2.3.1.RELEASE/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc Issue spring-projectsgh-9070
1c86e74
to
2595267
Compare
…vice Postgres doesn't have a BLOB type, but it does have an equivalent BYTEA type. This approach and naming convention follows the convention established in Spring Session JDBC which has sql for each RDBMS with files names in the pattern *-{dbname}.sql, for example: schema-db2.sql schema-derby.sql schema-h2.sql schema-mysql.sql schema-postgresql.sql See https://github.com/spring-projects/spring-session/tree/2.3.1.RELEASE/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc Issue gh-9070
Thank you for this valuable enhancement @candrews ! This is now in master. |
LobHandler provides an abstraction for handling large binary fields and large text
fields in specific databases, no matter if represented as simple types or
Large OBjects.
Its use provides compatibility with many databases eliminating the need
for custom OAuth2AuthorizedClientParametersMapper and
OAuth2AuthorizedClientRowMapper implementations.
This change brings
JdbcOAuth2AuthorizedClientService
into alignment with the best practices documented by Spring Framework at https://docs.spring.io/spring-framework/docs/5.2.9.RELEASE/spring-framework-reference/data-access.html#jdbc-lobThe problem that this PR fixes has been raised in a number of issues, including:
#9023
#8862
#8539