I'm using the apache http client in lift-paypal and have been contemplating extracring some of the util methods / factories into the lift-util package of lift so if your going to make something for OAuth go for http client for sure as it's already in use within the lift eco- system.
Cheers Tim Sent from my iPhone On 22 Jun 2009, at 16:59, "marius d." <[email protected]> wrote: > > > > On Jun 22, 3:25 am, DFectuoso <[email protected]> wrote: >> Well i went ahead and learn a lot from the lift-openId implementation >> and understand what I would need to do have lift-OAuth working >> >> It seems like i could do two things: >> 1) Get a OAuth java library that allows me to post, get, login and >> logout then create a OAuth.scala file where i create a trait of the >> OAuth Handler that would access to this methods, then create a object >> that extends from that trait; Then create a OAuthProtoUser.scala >> where >> I would have a trait for the MetaOAuthProtoUser with the Xhtml for >> login, override the menus that i would not use and perform the login >> and logout of the user as well as the post and get methods. Finally >> create a trait for the OAuthProtoUser that would allow me to store >> information about the user. > > Besides Proto stuff we'd need an abstraction over OAuth artifacts. > Essentially a wrapper over their Java library. > >> 2) Go ahead and have the login,logout, post and get methods on the >> OAuth.scala actually do the logic to get the tokens without a java >> library, this would mean creating some way of signing a url and body >> to post and get stuff from the request, access and user-auth Token >> Url >> or an url in the service. >> >> I have absolutely no experience with scala, java or lift but I really >> want to get some(by doing this type of stuff). So what do you think >> is >> better(for me to learn, for lift and for you). > > I think it would be a good exercise. Once you're done with it we could > probably review it and maybe it'll get its way into Lift if some > committer doesn't implement it in the mean time, but regardless would > be a good exercise for you. > >> >> Also, what part of this abstraction(and how) is the one to set the >> consumer_key, secret_key and the request urls? > > In OAuth world consumer secret and consumer key are somehow invariants > as they impersonate a trusted service. So I would put them into a > Scala object where user can just set these quantities from Boot. > >> >> Finally; a uber noob question, what is the equivalent of curl(php) or >> urllib/urlopen(python) that i would use in the second option to >> actually make the http request to ther other site? I think its a >> servlet but some trivial example on this would really help me =) > > You can just use HttpUrlConnection, or Apache Http client. > >> >> On Jun 21, 7:18 am, "marius d." <[email protected]> wrote: >> >>> OAuth is not implemented yet in Lift still the project folder is >>> there. I think Dave wanted to put it there but never got the >>> chance to >>> add it. >> >>> Br's, >>> Marius >> >>> On Jun 21, 9:29 am, DFectuoso <[email protected]> wrote: >> >>>> Im trying to integrate OAuth (with twitter) in one of my >>>> projects... >>>> and i saw the lift-oauth, but i cant find the code, documentation >>>> or >>>> examples around this module; so i guess either its somewhere else >>>> or >>>> people is doing their twitter integrations with other class(maybe >>>> java)... >> >>>> So what are you guys doing around OAuth and what could i do to get >>>> this rolling? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
