
Originally Posted by
Dave Syer
I'm not sure we are using the same sample code (did you get the latest?). When I log out of tonr and go to "sparklr pics" I have to re-authenticate with tonr (as expected), but then I see my pics right away without the browser having to render anything from sparklr, and without any more forms to submit.
As far as the provider goes, I suppose it could well be one that requires authentication more often than sparklr does, and then you would need to re-authenticate. It might also be one that doesn't cache its tokens (but I'm not sure why it wouldn't). All the major OAuth2 vendors in the social space that I have tried keep a browser session and remember token grants. You didn't say you were using a third party provider, but please try to remain calm.
Maybe we could look at a more explicitly cache-oriented solution to your problem? Spring has some nice features for that now, so I would be interested in seeing something that used @Cacheable on an AccessTokenProvider. That seems like the right level of abstraction to me.