You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've had a go at implementing the Consumer class in Javascript, reusing as much code as I could from the published Javascript Provider class. I'm short on time right now to bring this to the proper format for a PR, especially because I'm not versed in Coffeescript, but I'd really appreciate comments on the approach.
Also welcome any help bringing this to good enough condition for a pull request.
Implementation:
varlti=require('ims-lti');varconsumer=newlti.Consumer('oauth_key','oauth_secret');varrequestBody={lti_version : 'LTI-1p0',lti_message_type: 'basic-lti-launch-request',resource_link_id: '0',resource_link_title: 'My title',context_id: '1234',context_title: "My Test",context_label: "No label",roles: 'Student'};varltiUrl='https://lti.source.com/launch';consumer.validate_request(requestBody,function(err,valid){if(err||!valid)next(err||newError("Invalid LTI request"));else{consumer.send({url: ltiUrl},function(err,msg,response){res.send(response);}}}
Hi everyone,
I've had a go at implementing the Consumer class in Javascript, reusing as much code as I could from the published Javascript Provider class. I'm short on time right now to bring this to the proper format for a PR, especially because I'm not versed in Coffeescript, but I'd really appreciate comments on the approach.
Also welcome any help bringing this to good enough condition for a pull request.
Implementation:
consumer.js
The text was updated successfully, but these errors were encountered: