polleverywhere/ims-lti

Name: ims-lti

Owner: Poll Everywhere

Description: A Ruby library to help implement IMS LTI tool consumers and providers

Forked from: instructure/ims-lti

Created: 2017-04-24 16:05:42.0

Updated: 2017-04-24 16:05:43.0

Pushed: 2017-04-24 16:08:13.0

Homepage:

Size: 385

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

IMS LTI

Build Status

LTI ruby implementation

Installation

Add this line to your application's Gemfile:

gem 'ims-lti'

And then execute:

$ bundle

Or install it yourself as:

$ gem install lti
Usage
LTI 1.x
Validating Launches

You can use the classes in the IMS::LTI::Models::Messages module to valdiate Launches

For example in a rails app you would do the following

enticator = IMS::LTI::Services::MessageAuthenticator.new(request.url, request.request_parameters, shared_secret)

ck if the signature is valid
rn false unless authenticator.valid_signature?

eck if `params['oauth_nonce']` has already been used

ck if the message is too old
rn false if DateTime.strptime(request.request_parameters['oauth_timestamp'],'%s') < 5.minutes.ago
Contributing
  1. Fork it ( http://github.com/instructure/ims-lti/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.