Link to e-learning

Provides a direct authenticated link to a particular e-learning

This uses the same endpoint as User - Get Authentication, except the endpoint takes a couple of extra parameters context and context_id.

Once a link has been generated, the link can be presented to the user to click on, and the user will be directed straight to the e-learning without requiring to log in to the portal first.

Request

  • HTTP Verb: GET
  • URI: /user/{id}/authentication?context=e-learning&context_id={e-learning_id}

Query Parameters

  • id: user identifier. It could be either user id or user email.
  • e-learning_id: e-learning identifier.

Response Properties

accessLink link that may be used to access the e-learning
token hash that performs the authentication
expiration time limit for the authentication token. After that time the token becomes invalid

Request example

curl -H "Request-Time: Wed, 11 Dec 2013 13:15:04 +0000" \
     -H "Api-Key: 78b47a40f93378a6a487919edea6e92c" \
     -H "Signature: 0a035961fbf7d2ffdc5ca8780e0a33cb3d6c3a5f8fb0623e886c9933377d3e1e" \
     http://wceaapi.org/v1.1/user/adrian.perez@wcea.education/authentication?context=e-learning&context_id=123456

Output Example

{
  "_meta": {
   ...
  },
  "records": {
    "accessLink": "http://dmc.verifieddev1.101.org/auth?login_token=feb815ad2906bce7d85d38bdf8a3928f&redirectTo=http.....",
    "token": "feb815ad2906bce7d85d38bdf8a3928f",
    "expiration": "2013-11-21 14:42:43"
  }
}