Skip to content

OAuthService should be Serializable#238

Closed
bfuster wants to merge 1 commit intoscribejava:masterfrom
bfuster:master
Closed

OAuthService should be Serializable#238
bfuster wants to merge 1 commit intoscribejava:masterfrom
bfuster:master

Conversation

@bfuster
Copy link
Copy Markdown

@bfuster bfuster commented Mar 22, 2012

So I can save it on a distributed cache system.

@fernandezpablo85
Copy link
Copy Markdown
Collaborator

I don't see the point of storing an OAuthService in a cache, what's your use case?

@bfuster
Copy link
Copy Markdown
Author

bfuster commented Mar 22, 2012

After creating the OAuthService, I need to redirect the user to the authorization URL. After that authorization has been successful, the service will redirect the user back to my web app. Then I need the previously used OAuthService and RequestToken to obtain the Access Token and some user information.

Is there any other way to reconstruct the previously used OAuthService besides serializing in a cache ?

Thanks

@fernandezpablo85
Copy link
Copy Markdown
Collaborator

You don't need to reconstruct the OAuthService, it's intended to be used as
a singleton object. It's threadsafe so you can keep a global reference to
it anywhere you like.

Pablo

On Thu, Mar 22, 2012 at 3:59 PM, Bruno Fuster <
[email protected]

wrote:

After creating the OAuthService, I need to redirect the user to the
authorization URL. After that authorization has been successful, the
service will redirect the user back to my web app. Then I need the
previously used OAuthService and RequestToken to obtain the Access Token
and some user information.

Is there any other way to reconstruct the previously used OAuthService
besides serializing in a cache ?

Thanks


Reply to this email directly or view it on GitHub:

#238 (comment)

@bfuster
Copy link
Copy Markdown
Author

bfuster commented Mar 23, 2012

Huge mistake of mine :(

Didn't know it was threadsafe

@bfuster bfuster closed this Mar 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants