Module: IMS::LTI

Defined in:
lib/ims/lti.rb,
lib/ims/lti/tool_base.rb,
lib/ims/lti/extensions.rb,
lib/ims/lti/role_checks.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/deprecated_role_checks.rb,
lib/ims/lti/extensions/outcome_data.rb

Overview

These are here for backwards-compatibility But they are deprecated and the new ones in role_checks.rb should be used

Defined Under Namespace

Modules: DeprecatedRoleChecks, Extensions, LaunchParams, RequestValidator, RoleChecks 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

Class Method Details

.generate_identifierObject

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