Module: IMS::LTI
- Defined in:
- lib/ims/lti.rb,
lib/ims/lti/tool_base.rb,
lib/ims/lti/extensions.rb,
lib/ims/lti/tool_config.rb,
lib/ims/lti/launch_params.rb,
lib/ims/lti/tool_consumer.rb,
lib/ims/lti/tool_provider.rb,
lib/ims/lti/outcome_request.rb,
lib/ims/lti/outcome_response.rb,
lib/ims/lti/extensions/canvas.rb,
lib/ims/lti/request_validator.rb,
lib/ims/lti/extensions/content.rb,
lib/ims/lti/extensions/outcome_data.rb
Overview
:main:IMS::LTI LTI is a standard defined by IMS for creating eduction Tool Consumers/Providers. LTI documentation: www.imsglobal.org/lti/index.html
When creating these tools you will work primarily with the ToolProvider and ToolConsumer classes.
For validating OAuth request be sure to require the necessary proxy request object. See IMS::LTI::RequestValidator#valid_request? for more documentation.
Installation
This is packaged as the ‘ims-lti` rubygem, so you can just add the dependency to your Gemfile or install the gem on your system:
gem install ims-lti
To require the library in your project:
require 'ims/lti'
Defined Under Namespace
Modules: Extensions, LaunchParams, RequestValidator Classes: InvalidLTIConfigError, OutcomeRequest, OutcomeResponse, ToolBase, ToolConfig, ToolConsumer, ToolProvider
Constant Summary collapse
- VERSIONS =
The versions of LTI this library supports
%w{1.0 1.1}
Class Method Summary collapse
-
.generate_identifier ⇒ Object
Generates a unique identifier.
-
.post_service_request(key, secret, url, content_type, body) ⇒ Object
POST a signed oauth request with the given key/secret/data.
Class Method Details
.generate_identifier ⇒ Object
Generates a unique identifier
49 50 51 |
# File 'lib/ims/lti.rb', line 49 def self.generate_identifier SecureRandom.uuid end |
.post_service_request(key, secret, url, content_type, body) ⇒ Object
POST a signed oauth request with the given key/secret/data
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/ims/lti.rb', line 36 def self.post_service_request(key, secret, url, content_type, body) raise IMS::LTI::InvalidLTIConfigError, "" unless key && secret consumer = OAuth::Consumer.new(key, secret) token = OAuth::AccessToken.new(consumer) token.post( url, body, 'Content-Type' => content_type ) end |