module IMS
Constants
- VERSIONS
The versions of
LTI
this library supports
Public Class Methods
generate_identifier()
click to toggle source
Generates a unique identifier
# File lib/ims/lti.rb, line 45 def self.generate_identifier SecureRandom.uuid end
post_service_request(key, secret, url, content_type, body)
click to toggle source
POST a signed oauth request with the given key/secret/data
# File lib/ims/lti.rb, line 32 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