Omniauth strategy to authenticate using LTI spec
Latest commit 1fa7297 Apr 7, 2016 @xaviaracil Merge pull request #3 from abrom/master
Use safe version of tool provider request validator
Failed to load latest commit information.
lib Use safe version of tool provider request validator Apr 7, 2016
.gitignore first commit May 31, 2013
Gemfile first commit May 31, 2013 Better README Jun 3, 2013
Rakefile first commit May 31, 2013
omniauth-lti.gemspec Testing new version Jun 3, 2013

OmniAuth LTI

The OmniAuth LTI gem provides a way for applications to authenticate users using LTI 1.1 specification.

It relies on ims-lti gem for validating LTI data.


Add the gem in your Gemfile:

gem 'omniauth-lti'

And install it using bundle

bundle install


Add the provider to your OmniAuth stack, giving the tool_consumer credentials:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :lti, :oauth_credentials => {:test => 'secret'}

Include Omniauth::Lti::Context in your application_controller:

class ApplicationController < ActionController::Base
  include Omniauth::Lti::Context

When you create the session in your sessions\_controller, call to save_lti_context for saving LTI context through all the application

For accessing the context anywhere in your application, just call the helper method lti_tool_provider. For instance, to show the title of the resource that call your application just put in your haml view:


You can find an example web application in omniauth-lti-example-webapp


lti_tool_provider gives you the full IMS::LTI::ToolProvider class. Please refer to ( to see how to do outcomes with this class