Skip to end of metadata
Go to start of metadata

OAuth support in gadgets facilitates signed-in users to access private data from a hosting service to a consumer gadget. This feature allows communication with gadget users' services via the OAuth protocol.

OAuth key management of the WSO2 Gadget Server provides a place to manage gadget-specific OAuth keys. If your gadgets need to access a certain API via OAuth, this interface enables you to add the keys to the WSO2 Gadget Server. The gadget written with the added service ID can consume the required APIs via OAuth.

Infor:

For information on writing an OAuth gadget, refer to: http://code.google.com/apis/gadgets/docs/oauth.html

The following instructions demonstrate how OAuth supports works for gadgets in the WSO2 Gadget Server.

1. Log on to the Gadget Server Management Console.

2. In the "Manage Gadget Server" menu, click the "OAuth Key Management" link.

3. The OAuth Key Management user interface opens. Click the Add new consumer link.

4. Add the necessary OAuth consumer information and click Save.

5. Deploy the gadget in the gadget Repository and add it in to the Gadget Portal.

Shown below is an example of such a consumer gadget. It retrieves the Portal's signed-in user's Google account contacts through the Google Data API.

When the user clicks on the link displayed as Personalize this gadget, he/she will be directed to the following page. 

To retrieve back user's personal contact information to the gadget, user has to click the Grant Access button.

Then the consumer gadget will be displayed as follow. Click on the link displayed.

Finally, the Google account details of the signed-in user are displayed in the consumer gadget.

  • No labels