{"id":18544513,"url":"https://github.com/instructure/lti_provider_engine","last_synced_at":"2025-09-07T02:44:20.567Z","repository":{"id":11819785,"uuid":"14371485","full_name":"instructure/lti_provider_engine","owner":"instructure","description":"LtiProvider is a mountable engine for handling the LTI launch and exposing LTI parameters in your rails app.","archived":false,"fork":false,"pushed_at":"2024-03-21T18:07:52.000Z","size":204,"stargazers_count":7,"open_issues_count":2,"forks_count":15,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-24T10:56:28.323Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instructure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-13T17:45:48.000Z","updated_at":"2020-01-29T18:48:19.000Z","dependencies_parsed_at":"2022-08-28T11:20:49.189Z","dependency_job_id":null,"html_url":"https://github.com/instructure/lti_provider_engine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Flti_provider_engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Flti_provider_engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Flti_provider_engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Flti_provider_engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instructure","download_url":"https://codeload.github.com/instructure/lti_provider_engine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247749968,"owners_count":20989713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T20:16:46.424Z","updated_at":"2025-04-09T19:30:45.655Z","avatar_url":"https://github.com/instructure.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LtiProvider\n\nLtiProvider is a mountable engine for handling the LTI launch and exposing LTI\nparameters in your rails app.\n\n## Installation\n\nAdd the gem to your `Gemfile` with the following line, and then `bundle install`\n\n```\ngem 'lti_provider_engine', :require =\u003e 'lti_provider'\n```\n\nThen, mount the engine to your app by adding this line to your `routes.rb` file\n\n```\nmount LtiProvider::Engine =\u003e \"/\"\n```\n\nNext, include the engine in your `ApplicationController`\n\n```\nclass ApplicationController \u003c ActionController::Base\n  include LtiProvider::LtiApplication\n  \n  ...\nend\n```\n\nAfter that, create `lti.yml` and `lti_xml.yml` files in your `config/` folder that looks something\nlike this:\n\n**lti.yml**\n\n```\ndefault: \u0026default\n  key: your_key\n  secret: your_secret\n  require_canvas: true\n\ndevelopment:\n  \u003c\u003c: *default\n\ntest:\n  \u003c\u003c: *default\n\nproduction:\n  \u003c\u003c: *default\n```\n\nYou'll need the values of `key` and `secret` when you configure your lti app on\nthe tool consumer side.\n\n**lti_xml.yml**\n\n```\ndefault: \u0026default\n  tool_title: 'Dummy App'\n  tool_description: 'A very handy dummy application for testing LtiProvider engine integration.'\n  tool_id: 'dummy'\n  privacy_level: 'public'\n  account_navigation:\n    text: 'Dummy'\n    visibility: 'admins'\n  course_navigation:\n    text: 'Dummy'\n    visibility: 'admins'\n\ndevelopment:\n  \u003c\u003c: *default\n\ntest:\n  \u003c\u003c: *default\n\nproduction:\n  \u003c\u003c: *default\n```\n\nThese values are used in the `/configure.xml` endpoint.\n\nFinally, run migrations:\n\n```\nbundle install\nbundle exec rake railties:install:migrations\nbundle exec rake db:migrate\n```\n\nThis will create the `lti_provider_launches` table which stores parameters\ntemporarily through a cookie test redirect.  It is transient data.  It can be\naccessed from your main application as LtiProvider::Launch\n\n## Usage\n\nThe engine exposes a few urls from the mount point:\n\n  * `/cookie_test`\n  * `/consume_launch`\n  * `/launch`\n  * `/configure.xml`\n\nMostly, you don't have to worry about these, they are used to route through the\nlti launch.  However, `/configure.xml` can be useful in configuring the app on\nthe tool consumer side.  Right now it is hardcoded to 'Course Navigation' and\n'Account navigation' apps.\n\nThe engine sets up a global `before_filter`, requiring your app to be launched\nthrough lti.  It handles receiving the request, verifying it, and exposing\ncertain config variables sent with the launch parameters. Specifically, it\nexposes the following methods to your controllers:\n\n  * `canvas_url`\n  * `user_id`\n  * `current_course_id`\n  * `tool_consumer_instance_guid`\n  * `current_account_id`\n  * `course_launch?`\n  * `account_launch?`\n\n## Configuring the Tool Consumer\n\nYou will need `key` and `secret` from your `lti.yml` file, and you can find\nconfiguration xml (or at least a starting point) at\n`\u003cengine-mount-point\u003e/configure.xml`\n\n## Example\n\nYou can see and interact with an example of an app using this engine by looking\nat `spec/dummy`.  This is a full rails app which integrates the gem and has\na simple index page that says 'Hello LTI' if the app is launched through LTI.\n\n## About LTI\n\nInterested in learning more about LTI? Here are some links to get you started:\n\n  * [Introduction to LTI](http://www.imsglobal.org/toolsinteroperability2.cfm)\n  * [1.1.1 Implementation Guide](http://www.imsglobal.org/LTI/v1p1p1/ltiIMGv1p1p1.html)\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstructure%2Flti_provider_engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstructure%2Flti_provider_engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstructure%2Flti_provider_engine/lists"}