panda_pal 5.16.10 → 5.16.12
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 +4 -4
- data/app/models/panda_pal/platform/canvas.rb +11 -1
- data/lib/panda_pal/helpers/route_helper.rb +1 -1
- data/lib/panda_pal/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0442d4ba09d95ef51337e42da67e084ced8399cdaa025772a8bb74efc5d7c772
|
|
4
|
+
data.tar.gz: 80999b109c85aab72981be87b5d61be2fd4bf1a42ac37d036bf6fcdb4f2d7c6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb3aa209bef32fc3042ef04a25601fd9a768e64e9793632076d2f3ff8d5428aa4c7545ff9ab684071a7dda0c3aecc4cec8db58d5af005add8b815df21888046f
|
|
7
|
+
data.tar.gz: 4ead30f7c30fa32ff41e72e8389a9c46221c6d1ab8a4f7bd3c3a69565cf0d53fbf1d0001dfd7e14e289cd76e5303a003cd8d527a0c1a76f0ec636ce1a96f5e83
|
|
@@ -9,6 +9,7 @@ module PandaPal
|
|
|
9
9
|
"https://sso.canvaslms.com",
|
|
10
10
|
"https://sso.beta.canvaslms.com",
|
|
11
11
|
"https://sso.test.canvaslms.com",
|
|
12
|
+
"https://sso.loadtest.instructure.com",
|
|
12
13
|
|
|
13
14
|
# Deprecated (but still secure):
|
|
14
15
|
"https://canvas.instructure.com",
|
|
@@ -167,13 +168,22 @@ module PandaPal
|
|
|
167
168
|
lti_json["target_link_uri"]
|
|
168
169
|
]
|
|
169
170
|
|
|
171
|
+
canvas_ext = (lti_json["extensions"] || []).find { |ext| ext["platform"] == "canvas.instructure.com" }
|
|
172
|
+
placements = canvas_ext&.dig("settings", "placements") || []
|
|
173
|
+
placements.each do |p|
|
|
174
|
+
next unless p["target_link_uri"]
|
|
175
|
+
valid_redirect_uris << p["target_link_uri"].gsub(/\?.*$/, "")
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
valid_redirect_uris.uniq!
|
|
179
|
+
|
|
170
180
|
prod_domain = PandaPal.lti_environments[:domain]
|
|
171
181
|
if prod_domain.present?
|
|
172
182
|
PandaPal.lti_environments.each do |env, domain|
|
|
173
183
|
env = env.to_s
|
|
174
184
|
next unless env.ends_with?("_domain")
|
|
175
185
|
env = env.split('_')[0]
|
|
176
|
-
valid_redirect_uris
|
|
186
|
+
valid_redirect_uris += valid_redirect_uris.map{|uri| uri.gsub(prod_domain, domain)}
|
|
177
187
|
end
|
|
178
188
|
end
|
|
179
189
|
|
|
@@ -17,6 +17,6 @@ module PandaPal::Helpers::RouteHelper
|
|
|
17
17
|
lti_options[:route_helper_key] = path.split('/').reject(&:empty?).join('_')
|
|
18
18
|
post(path, options.dup, &block)
|
|
19
19
|
get(path, options.dup, &block)
|
|
20
|
-
PandaPal::
|
|
20
|
+
PandaPal::stage_navigation(nav, lti_options)
|
|
21
21
|
end
|
|
22
22
|
end
|
data/lib/panda_pal/version.rb
CHANGED