atomic_lti 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81905bc42beff53064deaef814aa929b43f73766f81e2159739cfa187d23c7d7
4
- data.tar.gz: 156ab5f22d91b0e9a74f101201f674bc416fcaa36ad4942812ffee11017d53da
3
+ metadata.gz: f5de79b035c9dcf52e0579701165c9d317724db6fad17ad072d767eb65ca6c2a
4
+ data.tar.gz: 30362e1c72ca07662455736e23a6a784539a732da6b4e23375f220ac87c74068
5
5
  SHA512:
6
- metadata.gz: 2e19ed34c5951f99b201149f13dcda60099c3a3da3cb56046d9126cc28c966afc10fc1a06f949ba3fcae24304938bed25763ed653c9468dd8c672d1fb6182540
7
- data.tar.gz: 3a516460e622b3d292027a69a7e6dc6fd03aaa693f7806182fc6a397680a79f9b8fce5783a0a72b9e8813da18eaf72041a744b2cec4a8486cb7b3f10ccd5b57f
6
+ metadata.gz: 5b7118809d65edc14c6692eca2ac35c42b9bff12a1b76a1f77674ae189a0422be118736c2ede3accce66150d6ca7cb4dfc1f8058569d31f03a055f0afb1d96b5
7
+ data.tar.gz: c414e39c0bb8c3e092fbabea946415afe405bde2bd6012b4a4fae5b7b49201a541f70a6116c71e44464dd94ca8f7f4562b007df77446bf47a322e6902d52ed96
@@ -111,12 +111,26 @@ module AtomicLti
111
111
  target_link_uri = id_token_decoded[AtomicLti::Definitions::TARGET_LINK_URI_CLAIM] ||
112
112
  File.join("#{uri.scheme}://#{uri.host}", AtomicLti.default_deep_link_path)
113
113
 
114
+ # We want to strip out the redirect path params from the request params
115
+ # so that we can support having the redirect path be the same as the
116
+ # launch path, only differentiated by a query parameter. This is needed
117
+ # because socialize journals redirects straight to /lti_launches and we
118
+ # have preexisting lti keys that we won't get to migrate and can't break
119
+ redirect_uri = URI.parse(AtomicLti.oidc_redirect_path)
120
+ redirect_path_params = if redirect_uri.query
121
+ CGI.parse(redirect_uri.query)
122
+ else
123
+ {}
124
+ end
125
+
126
+ launch_params = request.params.except(*redirect_path_params.keys)
127
+
114
128
  html = ApplicationController.renderer.render(
115
129
  :html,
116
130
  layout: false,
117
131
  template: "atomic_lti/shared/redirect",
118
132
  assigns: {
119
- launch_params: request.params,
133
+ launch_params: launch_params,
120
134
  launch_url: target_link_uri,
121
135
  },
122
136
  )
@@ -133,7 +147,7 @@ module AtomicLti
133
147
  redirect_path_params = if redirect_uri.query
134
148
  CGI.parse(redirect_uri.query)
135
149
  else
136
- []
150
+ {}
137
151
  end
138
152
 
139
153
  matches_redirect_path = request.path == redirect_uri.path
@@ -1,3 +1,3 @@
1
1
  module AtomicLti
2
- VERSION = "1.5.6".freeze
2
+ VERSION = "1.5.7".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atomic_lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Petro
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-10-28 00:00:00.000000000 Z
13
+ date: 2023-10-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pg