[seam-dev] Seam Social need help on OAuth Settings multiple scenario
Antoine Sabot-Durand
antoine at sabot-durand.net
Fri Feb 18 00:00:51 EST 2011
Hi,
To initialize connection to an OAuth service I need settings (service provider, Api Key, Api Secret, Callback url)
These settings are in a bean OAuthSettings with the given fields. I'd like to provide 3 scenario for user to provides those settings
1) have an @OAuthSet qualifiers with members that could let me write something like :
@Inject @OAuthSet(apiKey, apisecret, callback)
TwitterHandler twitterHdl
Knowing that the members of OAuthSet wouldn't be used directly for TwitterHandler creation but for the OAuthSettings bean injected in TwitterHandler
2) use seam config to initialize the values of OAuthSettings in beans.xml
3) Provide a way to have those settings as an entity bean loaded thru jpa by the consuming application
The strategy 1 seems nice but a bit tricky : I feel that I'll need a little more that a producer for that, perhaps an extension but I'm not quite sure.
I"m using strategy 2 right now but feel that my OAuthSettings bean implementation will not be compatible with an implementation for strategy 1
And concerning strategy 3, it makes me think that I'll have to provide an easy way for users to implement their own OAuth Settings initialization.
Any clue or advide on these matter ?
Thanks
Antoine SABOT-DURAND
---------------------------------------
Twitter ; http://twitter.com/antoine_sd
LinkedIn : http://fr.linkedin.com/in/antoinesabotdurand
06 08 55 34 26
More information about the seam-dev
mailing list