Using LinkedIn? OAuth key-secret Configuration Guidelines

What?

Use LinkedIn? as 3rd party application for registering a new user or logging into ODS DataSpace as already registered ODS User which account is associated with a given LinkedIn? account.

Why?

Makes the process of managing users register/log in activities easier.

How?

In order to be able to register a new user or to log in into ODS Dataspace as already registered ODS user, you need to:

  • Create ODS application within LinkedIn?:
    1. Get an API Key -- for identification;
    2. Get an Secret Key -- for hash salting;
    3. Provide a Callback URL -- for request & access token exchange via redirection.
  • Configure as ODS Administrator in Site Settings->Login Authentication Keys the LinkedIn? API to use the generate from above API and Secret Key.

When the above is done, you can perform the following activities in ODS:

  • Register in ODS using your LinkedIn? credentials, or:
  • For a regular ODS user, for ex. with name XXX you can add in Profile->Personal->Online Accounts your LinkedIn? account, which then will enable you to log in in your ODS XXX user dataspace using the LinkedIn? account credentials.

Examples

Prerequisites

Steps for Configuring LinkedIn? API Key and Secret Key

1 -- Get LinkedIn? API Key and Secret Key for use with ODS
  1. Browse to <https://www.linkedin.com/secure/developer> and enter your LinkedIn? use credentials:







  2. Click on Add New Application:







  3. In the presented form:
    1. "Company Info" section: enter company details if such are required for new companies;
    2. ""Application Info" section:
      1. Enter a name for your LinkedIn? client application to be known by, e.g., "MySimpleExample";
      2. Enter a description, e.g., "My LinkedIn? Example Application";
      3. Enter Website URL, e.g., http://example.com/;
      4. Set "Application Use";
    3. "Contact Info" section:
      1. Enter developer contact email;
      2. Enter phone for contact
    4. "OAuth User Agreement" section:
      1. Provide a Callback URL -- enter in "OAuth Redirect URL" your ODS site URL that should match the host of the ODS installation. For ex. if ODS runs at http://example.com/ods/ then the URL in the Facebook app should be http://example.com.com;
      2. Set language.
    5. "Term of Service" section: hatch the "Agree" check-box.











  4. Click "Add Application".
  5. The application should be registered and you will be shown a API Key and Secret Key for the newly registered application. You can copy these now as you will need these in the steps that follow:



2 - Configure ODS to use your LinkedIn? Consumer Key and Secret
  1. Browse to your Virtuoso + ODS instance, http://<cname>[:<port>]/ods, e.g., <http://example.com/ods/>, and click Sign In.



  2. Log in as a Virtuoso+ODS user with Administrator privileges, e.g., dba.



  3. Click on Site Settings:



  4. Click on Login Authentication Keys:



  5. Select LinkedInAPI in the API Name menu, provide the API Key and Secret Key from the new LinkedIn? application you created above, and click Add.



  6. ODS is now configured to use LinkedIn.



Example for Configuring regular ODS user to log in into ODS using LinkedIn? Account credentials

Here is a sample scenario how to configure a regular ODS user to be able to log in in its ODS Dataspace using his/her own LinkedIn? Account:

  1. Browse to your Virtuoso + ODS instance, http://<cname>[:<port>]/ods, e.g., <http://example.com/ods/>.



  2. Log in as a Virtuoso+ODS user with normal privileges, e.g., demo.



  3. Go to Profile Edit->Personal->Online Accounts:



  4. Click "Add":



  5. In the presented form select service LinkedIn?. By default the "Member Home Page URI" has http://linkedin.com/in/<your-ODS-user-name> and the "Account URI" has value http://host:port/about/id/entity/http/linkedin.com/in/<your-ODS-user-name>#this . You need to change the <your-ODS-user-name> from these URLs with your LinkedIn? account name.



  6. Click the "Link" button from "Action" column:



  7. Finally click "Save".
  8. Log out from ODS DataSpace.
  9. Make sure LinkedIn? Login is enabled from admin user available at Site Settings -> Members Registrations:



  10. Click Sign In.
  11. Go to "LinkedIn?" tab:



  12. Click "LinkedIn? Login".
  13. LinkedIn? should ask you to for authorization for the created application from above:



  14. Click "Allow Access" in the LinkedIn? form.
  15. On a successful authorization you should be redirected back to the ODS DataSpace and should be logged in as the regular user from above, e.g: user "demo".



Related