web api authentication..

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

web api authentication..

sergio_101-2
part of my app requires an authenticated login to last.fm as in:

http://www.last.fm/api/webauth

my question is:

how to i start a browser session in smalltalk to set up the
authenticated connection, then run through each of the api calls i
will need to make?

thanks!

--

----
peace,
sergio
photographer, journalist, visionary

http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: web api authentication..

Edgar J. De Cleene



On 2/25/10 3:09 AM, "sergio_101" <[hidden email]> wrote:

> part of my app requires an authenticated login to last.fm as in:
>
> http://www.last.fm/api/webauth
>
> my question is:
>
> how to i start a browser session in smalltalk to set up the
> authenticated connection, then run through each of the api calls i
> will need to make?
>
> thanks!
>
> --
>
> ----
> peace,
> sergio
> photographer, journalist, visionary

Before my new duties as Release manager, was development a new version of
Squeak Swiki using HV2 on top of Kom.

Share some tips
The starting point Web app
HVTransientView subclass: #HVNaughtieWiki

You must have in the class side

rootView
    ^ HVNaughtieWikiRoot

createModel
    ^ HVNaughtieWiki new

I attach the subclass of KomAuthDb and the class which is the root and say
where and how you log and which authenticated use.

Original KomAuthDb  uses user and password, you could see my in progress
thing use some more complex.

A typical user record is 'user' an OrderedCollection('[hidden email]'
'4/3/2005' 'nIxbXj1vR')

And a  typical log is
127.0.0.1 - garduino [23/Feb/2010:07:42:52] "GET
/schemes/squeak/topborder.gif HTTP/1.1" 200 44
127.0.0.1 - garduino [23/Feb/2010:07:42:52] "GET
/schemes/squeak/squeak-green.gif HTTP/1.1" 200 1905
127.0.0.1 - garduino [23/Feb/2010:07:42:52] "GET /schemes/squeak/Catcha.gif
HTTP/1.1" 200 1183

Hope this helps

Edgar


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

HVNaughtieUsers.st (1K) Download Attachment
HVNaughtieWikiRoot.st (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: web api authentication..

Andreas.Raab
In reply to this post by sergio_101-2
sergio_101 wrote:
> part of my app requires an authenticated login to last.fm as in:
>
> http://www.last.fm/api/webauth
>
> my question is:
>
> how to i start a browser session in smalltalk to set up the
> authenticated connection, then run through each of the api calls i
> will need to make?

Just as an FYI, I think you're looking at the wrong place. The page
you're referring to states explicitly: "This authentication how-to is
for web applications only. Desktop application developers should see the
desktop application how-to."

A "web application" is one that runs in a browser to begin with so the
question of how to launch a browser for your app isn't really applicable.

But besides that, I think you're looking for the ExternalWebBrowser
package which can be found at SqueakMap:

http://map.squeak.org/packagebyname/ExternalWebBrowser

Cheers,
   - Andreas
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: web api authentication..

sergio_101-2
oh!

that makes sense!

my bad..

thanks!

--

----
peace,
sergio
photographer, journalist, visionary

http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: web api authentication..

sergio_101-2
In reply to this post by Andreas.Raab
>
> http://map.squeak.org/packagebyname/ExternalWebBrowser
>

okay, i have this loaded up, but i can't seem to find any
documentation or examples...

what i am expecting to see is a way to start a web session as an
object that i can pass restful parameters (including authentication)
to.. and retrieve the necessary xml data..

thanks!



--

----
peace,
sergio
photographer, journalist, visionary

http://www.coffee-black.com
http://www.painlessfrugality.com
http://www.twitter.com/sergio_101
http://www.facebook.com/sergio101
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners