ims-lti 2.2.3 → 2.3.2

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
- SHA1:
3
- metadata.gz: 1ecba7e383b26f256f513d977ce7a1a5ddc6cf4d
4
- data.tar.gz: cbb2dcd2d373cb968b72d8ec689d6d1bb4e1b8df
2
+ SHA256:
3
+ metadata.gz: 6de9bbbf79d7c9a876eadd145ec7317b05268aa095ab1df5202db6c96d08599a
4
+ data.tar.gz: 3122f727f095833a7a3a380c46698da81f638a670f8bf49c72124327bf8fd1bb
5
5
  SHA512:
6
- metadata.gz: 1eee3ca7972a1c446be5e4a0abb85eba9c6aed471af0891c6cfad4999a876393349a89adbf84865e401b77732bd8da7bec9803adbb4e7d6fd054675a7f99bb49
7
- data.tar.gz: ef39d166b973161e51f2b91f01e39a26e26fe71fdde1ecee3d4f37f178db9bc5a9bdbf8b04afe9923385862bcea0b162a6ef23ce967778b11792ea0ea773108e
6
+ metadata.gz: 8c6f21d78459aa18c5953e7e4d40f59882abc5e927eff0c3fedb9672208ac89d4ee4bced6222498cf86b4ef7f9f0803f64ca7f0a99af79dcb6283f6cced63c0d
7
+ data.tar.gz: 8032a4d4d4ffb044a7fb915467b5267fcc0bbbeb07683f5d7d920cdd1d9ee4942f8a394da50c92c9c7c5ae2bbe27cee599b997ab60019931cf6ada666425ed9d
@@ -1,6 +1,6 @@
1
1
  module IMS::LTI::Models::MembershipService
2
2
  class LISPerson < Person
3
- attr_reader :email, :result_sourced_id, :sourced_id, :user_id
3
+ attr_reader :email, :result_sourced_id, :sourced_id, :user_id, :sis_id
4
4
 
5
5
  def initialize(opts={})
6
6
  super(opts)
@@ -8,6 +8,7 @@ module IMS::LTI::Models::MembershipService
8
8
  @result_sourced_id = opts[:result_sourced_id]
9
9
  @sourced_id = opts[:sourced_id]
10
10
  @user_id = opts[:user_id]
11
+ @sis_id = opts[:sis_id]
11
12
  end
12
13
  end
13
14
  end
@@ -47,6 +47,19 @@ module IMS::LTI::Models::Messages
47
47
  @descendants || Set.new
48
48
  end
49
49
 
50
+ # For signature generation -- see usage in signed_post_params
51
+ def convert_param_values_to_crlf_endings(hash)
52
+ hash.transform_values do |val|
53
+ if val.is_a?(String)
54
+ # Convert to all newlines first, for consistency, just in case there
55
+ # is some weird mix of newlines & carriage returns in input
56
+ val.encode(universal_newline: true).encode(crlf_newline: true)
57
+ else
58
+ val
59
+ end
60
+ end
61
+ end
62
+
50
63
  private
51
64
 
52
65
  def add_params(instance_variable, param, *params)
@@ -148,7 +161,11 @@ module IMS::LTI::Models::Messages
148
161
  end
149
162
 
150
163
  def signed_post_params(secret)
151
- message_params = oauth_params.merge(post_params)
164
+ # The params will be used in an HTML form, and browsers will always use
165
+ # newlines+carriage return line endings for submitted form data. The
166
+ # signature needs to match, and signature generation does not add carriage
167
+ # returns, so we ensure CRLF endings here.
168
+ message_params = self.class.convert_param_values_to_crlf_endings(oauth_params.merge(post_params))
152
169
  @message_authenticator = IMS::LTI::Services::MessageAuthenticator.new(launch_url, message_params, secret)
153
170
  @message_authenticator.signed_params
154
171
  end
@@ -219,4 +236,4 @@ module IMS::LTI::Models::Messages
219
236
  end
220
237
 
221
238
  end
222
- end
239
+ end
@@ -7,5 +7,6 @@ module IMS::LTI::Serializers::MembershipService
7
7
  set_attribute :result_sourced_id, key: :resultSourcedId
8
8
  set_attribute :sourced_id, key: :sourcedId
9
9
  set_attribute :user_id, key: :userId
10
+ set_attribute :sis_id, key: :sisId, optional: true
10
11
  end
11
12
  end
@@ -1,5 +1,5 @@
1
1
  module IMS
2
2
  module LTI
3
- VERSION = "2.2.3"
3
+ VERSION = "2.3.2"
4
4
  end
5
5
  end
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.2.3
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-02 00:00:00.000000000 Z
11
+ date: 2022-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -48,30 +48,30 @@ dependencies:
48
48
  name: faraday
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '0.8'
53
+ version: '2.0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '0.8'
60
+ version: '2.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: faraday_middleware
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - "~>"
65
+ - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.8'
67
+ version: '2.0'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - "~>"
72
+ - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.8'
74
+ version: '2.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: json-jwt
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -100,6 +100,20 @@ dependencies:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: 0.3.1
103
+ - !ruby/object:Gem::Dependency
104
+ name: rexml
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :runtime
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
103
117
  - !ruby/object:Gem::Dependency
104
118
  name: byebug
105
119
  requirement: !ruby/object:Gem::Requirement
@@ -335,10 +349,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
349
  - !ruby/object:Gem::Version
336
350
  version: '0'
337
351
  requirements: []
338
- rubyforge_project:
339
- rubygems_version: 2.5.1
352
+ rubygems_version: 3.2.15
340
353
  signing_key:
341
354
  specification_version: 4
342
355
  summary: Ruby library for creating IMS LTI tool providers and consumers
343
356
  test_files: []
344
- has_rdoc: