coalescing_panda 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -9,15 +9,17 @@ module CoalescingPanda
|
|
9
9
|
api_domain = uri.host
|
10
10
|
api_domain = "#{api_domain}:#{uri.port.to_s}" if uri.port
|
11
11
|
scheme = uri.scheme + '://'
|
12
|
+
@lti_params = params.to_hash
|
12
13
|
session['user_id'] = user_id
|
13
14
|
session['uri'] = params['launch_presentation_return_url']
|
15
|
+
session['lis_person_sourcedid'] = @lti_params['lis_person_sourcedid']
|
14
16
|
|
15
17
|
if token = CanvasApiAuth.where('user_id = ? and api_domain = ?', user_id, api_domain).pluck(:api_token).first
|
16
18
|
@client = Bearcat::Client.new(token: token, prefix: scheme+api_domain)
|
17
19
|
elsif @lti_account = params['oauth_consumer_key'] && LtiAccount.find_by_key(params['oauth_consumer_key'])
|
18
20
|
client_id = @lti_account.oauth2_client_id
|
19
21
|
client = Bearcat::Client.new(prefix: scheme+api_domain)
|
20
|
-
|
22
|
+
|
21
23
|
@canvas_url = client.auth_redirect_url(client_id,
|
22
24
|
coalescing_panda.oauth2_redirect_url({key: params['oauth_consumer_key'],
|
23
25
|
user_id: user_id, api_domain: api_domain}))
|
@@ -30,7 +32,7 @@ module CoalescingPanda
|
|
30
32
|
end
|
31
33
|
|
32
34
|
def have_session?
|
33
|
-
if(session['user_id'] && session['uri'])
|
35
|
+
if (session['user_id'] && session['uri'])
|
34
36
|
uri = URI.parse(session['uri'])
|
35
37
|
api_domain = uri.host
|
36
38
|
api_domain = "#{api_domain}:#{uri.port.to_s}" if uri.port
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coalescing_panda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|