[seam-dev] Seam Social need help on OAuth Settings multiple scenario

Jozef Hartinger jharting at redhat.com
Fri Feb 18 11:29:16 EST 2011


You do not need an extension for 1.). You can @Inject InjectionPoint 
metadata[1] directly into the producer method / bean being created. See 
the REST[2] module for an example.

[1] 
http://docs.jboss.org/cdi/spec/1.0/html/injectionelresolution.html#injectionpoint
[2] 
https://github.com/seam/rest/blob/master/impl/src/main/java/org/jboss/seam/rest/client/RestClientProducer.java


On 02/18/2011 06:00 AM, Antoine Sabot-Durand wrote:
> 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
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> seam-dev mailing list
> seam-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev


More information about the seam-dev mailing list