coalescing_panda 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,8 @@ module CoalescingPanda
|
|
7
7
|
|
8
8
|
if token = CanvasApiAuth.where('user_id = ? and api_domain = ?', user_id, api_domain).pluck(:api_token).first
|
9
9
|
@client = Bearcat::Client.new(token: token, prefix: ENV['OAUTH_PROTOCOL']+'://'+api_domain)
|
10
|
-
|
11
|
-
client_id =
|
10
|
+
elsif @lti_account = params['oauth_consumer_key'] && LtiAccount.find_by_key(params['oauth_consumer_key'])
|
11
|
+
client_id = @lti_account.oauth2_client_id
|
12
12
|
client = Bearcat::Client.new(prefix: 'http://'+api_domain)
|
13
13
|
@lti_params = params.to_hash
|
14
14
|
@canvas_url = client.auth_redirect_url(client_id,
|