ims-lti 2.3.3 → 2.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2471bb32ba4e415a4134bca8b7fd89e395e6d2fcea9cf694ae3a094599bed683
4
- data.tar.gz: 9978a2ca0c9f89cd4fdd03217cb0f13bde37098f45c319e2d813c3fad6102b31
3
+ metadata.gz: 9899601b123b10eb2feee49196ff7416632bca74d3d447944ce22b69fe72b3c4
4
+ data.tar.gz: 55862774dae198a76d3d179db2b651e08491a3b03fc2edf4615873270e9c0330
5
5
  SHA512:
6
- metadata.gz: b96119ce642dde977d998fb405576b21ca755311b841b49d9a985f556bf0fdfbbab60798027060f641463edd1329505a4a53ad916f75a9ce344d9c4723d1ab20
7
- data.tar.gz: 5e4fd658b0658adcdbcca33feacf429f04e8a0f354eb6db1d031cfa4b0655f9a8478131919f215d833d872478462677bfcd04ed6ee298a00ed85bcb921f3313c
6
+ metadata.gz: '0972ae6f32083f0386f81b0cf027429c7848edfc0e59a37477c6dfdab17183fd53697298e30944f3c91699b6f1c3a54271dd5c4a891fad0521bbab63d0a65c2b'
7
+ data.tar.gz: 2750f5c13df1af5faaefcf45bb44107d2194f79250b41e9f37d425c34e852d975fe3364b12dfb3f373b678d0d7837e8b56c26dcacb0afb02ea0db4fbc909afe9
data/README.md CHANGED
@@ -6,9 +6,11 @@ LTI ruby implementation
6
6
 
7
7
  ## Installation
8
8
 
9
- Add this line to your application's Gemfile:
9
+ Add these lines to your application's Gemfile:
10
10
 
11
11
  gem 'ims-lti'
12
+ # only necessary if using ToolProxyRegistrationService:
13
+ gem 'faraday-oauth' # or faraday_middleware if using Faraday < 2.0
12
14
 
13
15
  And then execute:
14
16
 
@@ -41,6 +43,19 @@ return false if DateTime.strptime(request.request_parameters['oauth_timestamp'],
41
43
 
42
44
  ```
43
45
 
46
+
47
+ ```ruby
48
+
49
+ params = { user_id: '123', lti_message_type: IMS::LTI::Models::Messages::BasicLTILaunchRequest::MESSAGE_TYPE }
50
+
51
+ header = SimpleOAuth::Header.new(:post, 'https://yoursite.com', params, consumer_key: oauth_consumer_key, consumer_secret: secret)
52
+
53
+ signed_params = header.signed_attributes.merge(params)
54
+
55
+ IMS::LTI::Services::MessageAuthenticator.new(launch_url, signed_params, secret)
56
+
57
+ ```
58
+
44
59
  ## Contributing
45
60
 
46
61
  1. Fork it ( http://github.com/instructure/ims-lti/fork )
@@ -11,7 +11,11 @@ module IMS::LTI::Services
11
11
 
12
12
  def connection
13
13
  @connection ||= Faraday.new base_url do |conn|
14
- conn.authorization :Bearer, token
14
+ if Gem::Version.new(Faraday::VERSION) < Gem::Version.new('1.0')
15
+ conn.authorization :Bearer, token
16
+ else
17
+ conn.request :authorization, 'Bearer', token
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -1,5 +1,5 @@
1
1
  module IMS
2
2
  module LTI
3
- VERSION = "2.3.3"
3
+ VERSION = "2.3.5"
4
4
  end
5
5
  end
data/lib/ims/lti.rb CHANGED
@@ -1,7 +1,6 @@
1
1
  require 'addressable/uri'
2
2
  require 'builder'
3
3
  require 'faraday'
4
- require 'faraday_middleware'
5
4
  require 'json'
6
5
  require 'json/jwt'
7
6
  require 'rexml/document'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ims-lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-03 00:00:00.000000000 Z
11
+ date: 2024-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -50,42 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '2.0'
54
- type: :runtime
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - "<"
59
- - !ruby/object:Gem::Version
60
- version: '2.0'
61
- - !ruby/object:Gem::Dependency
62
- name: faraday_middleware
63
- requirement: !ruby/object:Gem::Requirement
64
- requirements:
65
- - - "<"
66
- - !ruby/object:Gem::Version
67
- version: '2.0'
53
+ version: '3.0'
68
54
  type: :runtime
69
55
  prerelease: false
70
56
  version_requirements: !ruby/object:Gem::Requirement
71
57
  requirements:
72
58
  - - "<"
73
59
  - !ruby/object:Gem::Version
74
- version: '2.0'
60
+ version: '3.0'
75
61
  - !ruby/object:Gem::Dependency
76
62
  name: json-jwt
77
63
  requirement: !ruby/object:Gem::Requirement
78
64
  requirements:
79
65
  - - "~>"
80
66
  - !ruby/object:Gem::Version
81
- version: '1.7'
67
+ version: 1.16.6
82
68
  type: :runtime
83
69
  prerelease: false
84
70
  version_requirements: !ruby/object:Gem::Requirement
85
71
  requirements:
86
72
  - - "~>"
87
73
  - !ruby/object:Gem::Version
88
- version: '1.7'
74
+ version: 1.16.6
89
75
  - !ruby/object:Gem::Dependency
90
76
  name: simple_oauth
91
77
  requirement: !ruby/object:Gem::Requirement
@@ -114,20 +100,6 @@ dependencies:
114
100
  - - ">="
115
101
  - !ruby/object:Gem::Version
116
102
  version: '0'
117
- - !ruby/object:Gem::Dependency
118
- name: byebug
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: '9.0'
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
129
- - !ruby/object:Gem::Version
130
- version: '9.0'
131
103
  - !ruby/object:Gem::Dependency
132
104
  name: guard
133
105
  requirement: !ruby/object:Gem::Requirement
@@ -349,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
321
  - !ruby/object:Gem::Version
350
322
  version: '0'
351
323
  requirements: []
352
- rubygems_version: 3.2.22
324
+ rubygems_version: 3.1.6
353
325
  signing_key:
354
326
  specification_version: 4
355
327
  summary: Ruby library for creating IMS LTI tool providers and consumers