My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
UserAuthentication  
Updated Feb 4, 2010 by jorgeter...@gmail.com

To use the API in authenticated mode your application needs to be authorized by a user, so you'll be able to access her agenda. If your application is a web page the process is simple, otherwise it involves some steps to be taken in the application side and some others in 11870 web site.

This page explains how to make use of the java library to accomplish the steps that rest on the application side. To have a better understanding of the whole process you should read the API doc.

UserAuth

Each step is implemented as a different method in the class UserAuth. First you should instantiate it:

UserAuth userAuth = new UserAuth();

Direct user to 11870

You must get a temporal token:

String tempToken = userAuth.getTempToken(APP_TOKEN, SECRET);

You are ready now to direct the user to 11870 web site so she can grant authorization to your app. You can ask for read or write access:

String url = userAuth.getAuthURL(tempToken, UserAuth.Permission.WRITE);

That URL asks the user to authorize your application.

Complete authorization

The user has already completed the authorization in the 11870 web site. You can now retrieve the authToken:

String authToken = userAuth.getAuthToken(tempToken);

Sign in to add a comment
Powered by Google Project Hosting