Skip to content

Kulgar/lti_tool_provider_rails_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LTI Tool Provider - a Rails application example

A basic Rails app to use as a start for your LTI provider apps. You can also use it to follow the course: Canvas LTI Course to learn more about LTI apps.

Work in progress...

LTI Parameters

When you are connecting your tool provider to a tool consumer (like Canvas), the tool consumer will send back a lot of parameters to you. The following parameters should always be sent back to you, here is a list of those parameters and what they are:

  • LTI message type, should always equal (for now): basic-lti-launch-request
  • LTI Version, for now, should be: lti_version: LTI-1.0
  • Resource link id: uniq for each spot where the app is used in a course/plateform. Example: resource_link_id: a2b86a2534
  • User Id: uniq id for the user across a platform. Example: user_id: fb7e22d87d
  • Roles: Store the roles of users in specific short or long formats: http://www.imsglobal.org/lti/blti/bltiv1p0/ltiBLTIimgv1p0.html#_Toc261271984
  • OAuth Consumer Key: uniq key that should be sent back to the app along with a shared secret. Example: oauth_consumer_key: 2f8f0761267181a085502a6b62256de1
  • OAuth Nonce: random string generated by the platform to improve security. One oauth_nonce should not be used within the next 90 minutes of its first use thus they should be stored for comparisons/historics. Example: oauth_nonce: NszcH4JPm5HCtzB2UcyDKggHzrny9iyaEOikkIP8UI
  • OAuth Timestamp: Timestamp to prevent replay attacks. It should not be too old and thus we have to check it is quite "recent". Example: oauth_timestamp: '1404812533'
  • OAuth Signature: generated based on all others parameters. It should be checked for security reasons. Example: oauth_signature: kXplraBcOlciwjohNsKzkZFr9Js=
  • lis_person_name_full, lis_person_contact_email_primary, lis_person_name_given, and lis_person_name_family: Parameters to identify user, the parameters should contain one of those
  • Outcome Service Url: tells us if we can post grades to the gradebook or not. If it's there, we can, if not, we can't. Example: lis_outcome_service_url: https://learn-lti.herokuapp.com/grade_passback/2757
  • Context Id: (optional) uniq id for the course/group setting. Example: context_id: a8973674c7
  • Custom Params: custom parameters that may be sent to give more information (or used at app config time to send them in each request). Those are optional parameters. Example: custom_bacon: '4010591865'

LTI Course

This app was built while following the lessons of this course: Canvas LTI Course. You can use it to follow the same course. You should probably create a new controller and add your custom routes and when you get stuck you can take a look at the "LtiCoursesController" (and views) where you will find the code used for each section in the course.

If you want to get rid of this course code you just have to remove the routes in routes.rb, delete the controller and the corresponding lti_courses views folder.

About

A basic Rails app to build your LTI apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published