qalam_oauth_engine 3.0.2 → 3.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d5f44f20e6e7274024cb0db320eea0b44c806fe1071a6b1f22f55126d9705a7
|
4
|
+
data.tar.gz: 98a8dbd9c702bcf62038b8acc8916c2357684995fb44538ac95a073d6254af8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33f504f27fad28dd842e8cc0c8e1766e77dc1561b6fbd93e9b798ee29f72355431f7acca0007cdf0b82d2d131b82b4d3b6bb116d0190c12889dcf4bcc2f96699
|
7
|
+
data.tar.gz: fd3270a95699a8cc7c9bedbda1b0ec3cc46a2bf31ff06f363e50b1d5f6dbd459b83487bbf2a8f6ae09793bffe5fdadcb16e8ae5a044f22e0564a413238f5dd14
|
@@ -3,7 +3,9 @@ module CanvasOauth
|
|
3
3
|
def self.build(canvas_url, user_id, tool_consumer_instance_guid)
|
4
4
|
refresh_token = CanvasOauth::Authorization.fetch_refresh_token(user_id, tool_consumer_instance_guid)
|
5
5
|
token = CanvasOauth::Authorization.fetch_token(user_id, tool_consumer_instance_guid)
|
6
|
-
|
6
|
+
canvas_key = ((CanvasLtiKey.table_exists? && CanvasLtiKey.find_by(canvas_url: canvas_url)&.key) or CanvasConfig.key)
|
7
|
+
canvas_secret = ((CanvasLtiKey.table_exists? && CanvasLtiKey.find_by(key: canvas_key, canvas_url: canvas_url)&.secret) or CanvasConfig.secret)
|
8
|
+
CanvasApi.new(canvas_url, user_id, token, refresh_token, canvas_key, canvas_secret)
|
7
9
|
end
|
8
10
|
end
|
9
11
|
end
|
@@ -17,15 +17,10 @@ module CanvasOauth
|
|
17
17
|
config = load_config
|
18
18
|
self.key = config['key']
|
19
19
|
self.secret = config['secret']
|
20
|
-
|
21
|
-
Rails.logger.info "\n> Initializing Key #{config['key']} - Secret #{config['secret']}\n".green
|
22
|
-
|
23
20
|
elsif ENV['CANVAS_KEY'].present? && ENV['CANVAS_SECRET'].present?
|
24
21
|
Rails.logger.info "Initializing Qalam using environment vars CANVAS_KEY and CANVAS_SECRET"
|
25
22
|
self.key = ENV['CANVAS_KEY']
|
26
23
|
self.secret = ENV['CANVAS_SECRET']
|
27
|
-
|
28
|
-
Rails.logger.info "\n> Initializing Key #{ENV['CANVAS_KEY']} - Secret #{ENV['CANVAS_SECRET']}\n".green
|
29
24
|
else
|
30
25
|
warn "Warning: Qalam key and secret not configured (RAILS_ENV = #{ENV['RAILS_ENV']})."
|
31
26
|
end
|
data/lib/canvas_oauth/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qalam_oauth_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Donahue
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-08-
|
14
|
+
date: 2021-08-09 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: httparty
|
@@ -257,10 +257,12 @@ files:
|
|
257
257
|
- Rakefile
|
258
258
|
- app/controllers/canvas_oauth/canvas_controller.rb
|
259
259
|
- app/controllers/canvas_oauth/oauth_application_controller.rb
|
260
|
+
- app/models/canvas_lti_key.rb
|
260
261
|
- app/models/canvas_oauth/authorization.rb
|
261
262
|
- config/canvas.yml.example
|
262
263
|
- config/routes.rb
|
263
264
|
- db/migrate/20121121005358_create_canvas_oauth_authorizations.rb
|
265
|
+
- db/migrate/20210809092919_create_canvas_lti_keys.rb
|
264
266
|
- lib/canvas_oauth.rb
|
265
267
|
- lib/canvas_oauth/canvas_api.rb
|
266
268
|
- lib/canvas_oauth/canvas_api_extensions.rb
|
@@ -330,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
330
332
|
- !ruby/object:Gem::Version
|
331
333
|
version: '0'
|
332
334
|
requirements: []
|
333
|
-
rubygems_version: 3.2.
|
335
|
+
rubygems_version: 3.2.22
|
334
336
|
signing_key:
|
335
337
|
specification_version: 4
|
336
338
|
summary: CanvasOauth is a mountable engine for handling the oauth workflow with canvas
|