17.4.5.ODS Ubiquity Commands

ODS provides Ubiquity commands to manipulate user accounts as well as instances and instance specific data using the ODS Controllers API. This command set is available only for the Firefox browser with the Ubiquity extension installed.

Installation

First, the Ubiquity Firefox extension must be installed. Then, ODS Ubiquity commands can be installed by accessing http://host:port/ods/ods_ubiquity.html page. Ubiquity commands are accessed by the ctrl-space key combination.

Basic Session Setup Commands

ODS OAuth Endpoint Identification

Assuming the OAuth endpoint: http://myopenlink.net/OAuth, in order to change it use the command:

Syntax: ods-oauth-host <host_url>
Example: ods-oauth-host http://demo.openlinksw.com/OAuth
ODS Command Mode

There are two command modes available to ubiquity commands when working against an ODS instance: oauth or sid.

In OAuth mode, for every ODS application instance, an OAuth key must be obtained and then initialized via the following steps:

  • obtain an ODS based OAuth session-key via the ODS example endpoint: http://host:port/ods/oauth_sid.vsp

    http://myopenlink.net/ods/oauth_sid.vsp
    
  • bind session key to command session via the command: *ods-set-oauth <oauth-key>* or use *ods-set-[class name]-oauth <oauth-key>* when oauth-key was generated for particular application instance.

If you choose the SID mode of interaction with ODS you have to perform the following steps:

  • set mode via command: ods-set-mode sid or ods-set-mode oauth

  • set sid via command: ods-set-sid sid

Note: The sid is a session ID applicable to all ODS commands for a given bound instance and user combination. It's obtained from an ODS session.

Example

The following example demonstrates oauth authentication getting the OAuth SID value for ex. for existing Bookmark instance "mybookmarks" with owner user demo at the OpenLink Demo server.

In order to execute correctly the example, you need to have OAuth Generate Key for the Bookmark "mybookmarks" instance at OpenLink Demo server. More information and simple scenario how to be done you can find here.

  1. Execute the command:

    ods-oauth-host <host_url>
    -- for ex.:
    ods-oauth-host http://demo.openlinksw.com/OAuth
    

    Figure17.30.OAuth Authentication

    OAuth Authentication

  2. Execute the command:

    ods-set-mode oauth
    

    Figure17.31.OAuth Authentication

    OAuth Authentication

  3. Obtain the OAuth Generated Key:

    1. Go to http://cname:port/ods/oauth_sid.vsp . For ex. http://demo.openlinksw.com/ods/oauth_sid.vsp

      Figure17.32.OAuth Authentication

      OAuth Authentication

    2. In the shown form enter user demo and choose the application "mybookmarks". Click the "Execute" button.

      Figure17.33.OAuth Authentication

      OAuth Authentication

  4. As result will be shown a form where you need to enter the user password.

  5. Enter for user demo its password and click the "Login" button.

    Figure17.34.OAuth Authentication

    OAuth Authentication

  6. Click the "Authorize" button.

    Figure17.35.OAuth Authentication

    OAuth Authentication

  7. Copy the obtains OAuth SID value for ex.: 7ef4dcf23869488823b771b09b952cc9

    Figure17.36.OAuth Authentication

    OAuth Authentication

  8. Execute the following command:

    ods-set-sid 7ef4dcf23869488823b771b09b952cc9
    
    or
    
    ods-set-addressbook-oauth 7ef4dcf23869488823b771b09b952cc9
    

    Figure17.37.OAuth Authentication

    OAuth Authentication

  9. You can also execute the command(s) depending on the application type:

    ods-set-briefcase-oauth <the obtained oauth session-key>
    -- or
    ods-set-bookmark-oauth <the obtained oauth session-key>
    -- or
    ods-set-feeds-oauth <the obtained oauth session-key>
    -- or
    ods-set-calendar-oauth <the obtained oauth session-key>
    -- or
    ods-set-addressbook-oauth <the obtained oauth session-key>
    -- or
    ods-set-poll-oauth <the obtained oauth session-key>
    -- or
    ods-set-weblog-oauth <the obtained oauth session-key>
    -- or
    ods-set-discussion-oauth <the obtained oauth session-key>
    
    
[Tip] See Also:

the full list of ODS Ubiquity Commands and the full list of OpenLink Data Spaces (ODS) Ubiquity Commands Tutorials