JdbcOAuth2AuthorizedClientService is dependend on non-standard driver behaviour #9023
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: duplicate
A duplicate of another issue
Describe the bug
I'm using the
JdbcOAuth2AuthorizedClientService
with the MariaDB java connector. Authorization fails with aSQLSyntaxErrorException
:To Reproduce
Use the
JdbcOAuth2AuthorizedClientService
with the MariaDB java connector.Expected behavior
No exception should be thrown.
The problem is these two lines:
According to the JDBC specification, a driver has to implement conversions between
byte[] <=> BINARY, VARBINARY, LONGVARBINARY
andjava.sql.Blob <=> BLOB
. While some drivers implement a conversion betweenbyte[]
andBLOB
, it's a non-standard behaviour and you can't rely on it.So, in this case, the
byte[]
s should be wrapped in an appropriatejava.sql.Blob
type.The text was updated successfully, but these errors were encountered: