Hello Sabine,
The package versions that support Dropbox are not yet part of ConfigurationOfZincHTTPComponent. If you load the latest versions of the Zinc-SSO packages using the Monticello browser it should work.
�
Jan.
Hi Sven,
after loading:
Gofer it
� url: 'http://mc.stfx.eu/ZincHTTPComponents';
� package: 'ConfigurationOfZincHTTPComponents';� load.The ZnOAuth1ConsumerData does not have a method called >>newForDropbox (but >>newForGoogle and >>newForTwitter).
ConfigurationOfZincHTTPComponents project latestVersion load: 'SSO'.
Also, ZnSSOServerDelegate does not have a method >>dropboxData: (but facebook, twittter and google)
Did I miss something?
Greetings
SabineOn Sun, Jan 27, 2013 at 8:47 PM, Sven Van Caekenberghe <sven@stfx.eu> wrote:
How to run the Dropbox code yourself:
On 27 Jan 2013, at 13:32, Sven Van Caekenberghe <sven@stfx.eu> wrote:
> If anyone is interested, I can write another email explaining how you can run this demo for yourself on your own account.
1. Get yourself a free Dropbox account at http://www.dropbox.com
2. Install some client software on one or more of your computers (Mac, Windows, Linux) or devices (iOS [iPhone, iPad, iPod], Android, BlackBerry, Kindle Fire) and move some files around to get a feel for the service.
3. When you give other applications access to (part of) your Dropbox files, you can check that at https://www.dropbox.com/account#applications
4. Define your own app that will try to access Dropbox files. Go to https://www.dropbox.com/developers (Developer home) and start defining a new app by clicking the 'Create an app' button at https://www.dropbox.com/developers/apps - start with the access type 'App folder'.
5. The two important elements you need are the 'App key' and 'App secret', make sure to copy them correctly.
6. Get the very latest code in your image (we develop in Pharo 2.0, but 1.4 or even 1.3 should work - SSL has to be fully operational).
Gofer it
� url: 'http://mc.stfx.eu/ZincHTTPComponents';
� package: 'ConfigurationOfZincHTTPComponents';
� load.
ConfigurationOfZincHTTPComponents project latestVersion load: 'SSO'.
7. Start a Zn server with an appropriate delegate, configured for your app
(ZnServer startDefaultOn: 8100)
� � � � logToTranscript;
� � � � debugMode: true;
� � � � delegate: (ZnSSOServerDelegate new
� � � � � � � � dropboxData: (ZnOAuth1ConsumerData newForDropbox
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � consumer: 'vqz-app-key-zoca';
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � consumerSecret: '13u-app-secret-8l006';
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � yourself);
� � � � � � � � yourself).
(The above is a demo setup limited to Dropbox, the other demos are not configured and won't work).
8. Go to http:://localhost:8100/sso-dropbox and click the link to log in - you will be transferred to Dropbox to log in (if you aren't already) and asked to authorise your demo app, after which Dropbox will redirect you back to your app.
9. Once back in your app, sso-dropbox-callback (#ssoDropboxCallback:) will access your account info and list the app root folder, which will then be shown.
10. For the rest of the API, (currently not yet implemented), see https://www.dropbox.com/developers/reference/api - you don't have to worry about the whole authentication thanks to Zinc-SSO.
We would love for others to try this (as well as the other Zinc-SSO options, Google, Facebook, Twitter) out, in their own projects, and to provide actual feedback and generally help improve the code and documentation.
As always, May the Source be with you!
Sven
PS: The demo app is not (yet) a production app: only you and up to 5 explicitly listed users can use it. You have to apply for production status later on. Also, the whole ZnSSOServerDelegate code is a demo, for an actual project, it would be best to extract the necessary parts out of it, reusing the underlying Zinc-SSO-OAuth1-Core framework.