I'm using the JdbcTokenStore as well. I'm thankful that an implementation I can use exists, but am not crazy about serializing Java objects to binary because it makes troubleshooting and upgrades more difficult. I think converting the BLOBs to CLOBS and serializing to JSON will probably work for me. I am currently working with the M6 release. It looks like we are serializing 3 classes: OAuth2AccessToken, OAuth2Authentication and ExpiringOAuth2RefreshToken.
OAuth2AccessToken and ExpiringOAuth2RefreshToken are pretty straightforward (I'll just have the Jackson mapper ignore any current Jackson annotations in these POJOs) as they wholly belong to the Spring OAuth project.
OAuth2Authentication is a bit more interesting in that it extends from Spring Security's AbstractAuthenticationToken. Without having fully analyzed the code, I'm wondering how much of OAuth2Authentication I really need to serialize. Here's a sample json serialization of an OAuth2Authentication object:
Code:
{
"details": null,
"authorities": [],
"authenticated": false,
"userAuthentication": {
"details": null,
"authorities": [],
"authenticated": false,
"principal": "test2",
"credentials": null,
"name": "test2"
},
"credentials": "",
"principal": "test2",
"clientOnly": false,
"authorizationRequest": {
"scope": [],
"resourceIds": null,
"approved": true,
"authorities": null,
"parameters": {
"scope": null,
"redirect_uri": null,
"state": null,
"client_id": "id"
},
"state": null,
"clientId": "id",
"denied": false,
"redirectUri": null,
"responseTypes": []
},
"name": "test2"
}
-Lee-