Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Security Oauth2 SQL Schema for Postgres?

I intend to use: JdbcTokenStore.

As far as I can tell it uses two tables: oauth_access_token and oauth_refresh_token

I can reverse engineer the table structure; it isn't quite clear if there are references from one table to the other for which I should create a foreign key or not?

Is there a postgres specific schema somewhere? Or another schema that I can refer to?

Batch, for instance, includes the schemas in their dist. I wonder if Oauth2 could do that also?

Many thanks, Matt

like image 667
Matt Friedman Avatar asked Feb 20 '26 11:02

Matt Friedman


1 Answers

the schema is checked into git as well: https://github.com/spring-projects/spring-security-oauth/blob/master/spring-security-oauth2/src/test/resources/schema.sql

when using postgres you should use bytea instead of LONGVARBINARY

like image 196
hotzen Avatar answered Feb 22 '26 13:02

hotzen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!