Persist tokens between restarts #3

Merged
ansv7779 merged 1 commits from persistent-tokens into main 2025-03-28 12:06:22 +01:00
Owner

Utilize Java serialization to turn the entire OAuth2Authorization to a binary blob and store that in the database. Could not find a better way to do it given the types involved (like Map<String, Object> properties). Sure, Java serialization can fail on arbitrary objects but hopefully since OAuth2Authorization implements java.io.Serializable any properties put in are serializable as well.

Fixes

Utilize Java serialization to turn the entire `OAuth2Authorization` to a binary blob and store that in the database. Could not find a better way to do it given the types involved (like `Map<String, Object> properties`). Sure, Java serialization can fail on arbitrary objects but hopefully since `OAuth2Authorization` implements `java.io.Serializable` any properties put in are serializable as well. Fixes #2
ansv7779 added 1 commit 2025-03-28 12:00:07 +01:00
Utilize Java serialization to turn the entire OAuth2Authorization to a binary blob and store that in the database. Could not find a better way to do it given the types involved (like Map<String, Object> properties). Sure, Java serialization can fail on arbitrary objects but hopefully since OAuth2Authorization implements java.io.Serializable any properties put in are serializable as well.
ansv7779 merged commit 9a6e21a396 into main 2025-03-28 12:06:22 +01:00
Sign in to join this conversation.
No Reviewers
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DMC/oauth2-authorization-server#3
No description provided.