4

I'm trying to use LTI to integrate an LMS (Canvas) with my 3rd party learning tool. As part of the process, I'm taking the Request variables as sent to me by Canvas:

Array ( [oauth_consumer_key] => key
        [oauth_nonce] => s78gkWprnVJ6qp2UaCaEZ39WoYm91yOztiCBRhDx7s
        [oauth_signature] => l82UMpiOt62vTd7Eu4GzyVVxYk0=
        [oauth_signature_method] => HMAC-SHA1
        [oauth_timestamp] => 1367072335 [oauth_version] => 1.0 )

and sending them via a header to my "request_token.php" script (taken from google's oAuth code). The result is Invalid signature. I've tested the code locally, however, and it seems to work fine when not pulling the info from my LMS. I've var_dumped the OAuthRequest object as a further indication that it looks like the OAuthRequest is in fact using the correct variables.

OAuthRequest Object
( [parameters:protected] =>
Array ( [oauth_consumer_key] => key
        [oauth_nonce] => s78gkWprnVJ6qp2UaCaEZ39WoYm91yOztiCBRhDx7s
        [oauth_signature] => l82UMpiOt62vTd7Eu4GzyVVxYk0=
        [oauth_signature_method] => HMAC-SHA1
        [oauth_timestamp] => 1367072335 [oauth_version] => 1.0 )
        [http_method:protected] => GET
        [http_url:protected] => http://www.itsmorethanatextbook.com:80/oauth/example/request_token.php?oauth_consumer_key=key&oauth_nonce=s78gkWprnVJ6qp2UaCaEZ39WoYm91yOztiCBRhDx7s&oauth_signature=l82UMpiOt62vTd7Eu4GzyVVxYk0=&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1367072335&oauth_version=1.0
        [base_string] => GET&http%3A%2F%2Fwww.itsmorethanatextbook.com%2Foauth%2Fexample%2Frequest_token.php&oauth_consumer_key%3Dkey%26oauth_nonce%3Ds78gkWprnVJ6qp2UaCaEZ39WoYm91yOztiCBRhDx7s%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1367072335%26oauth_version%3D1.0 )

Might there be some additional step that one needs to take with the LTI variables to make it work? (I tried encoding them but to no avail)

Bigood
  • 9,457
  • 3
  • 36
  • 65
Eric
  • 967
  • 1
  • 12
  • 28
  • were you able to figure this out? I'm have the same problem. Any help would be appreciated. – Sandy DeLeon May 28 '13 at 14:19
  • I was able to figure it out, but not without lots of head banging and code tweaking. However, if it helps, I wound up using http://ims-dev.googlecode.com/svn/trunk/basiclti/php-simple/ along with this blog: https://learntech.imsu.ox.ac.uk/blog/?p=339. A basic understanding of object oriented programming will be required to understand the full process. – Eric May 28 '13 at 20:27
  • Both of these links are bad. Can you summarize the general area where the problem was? – Joshua Frank Mar 04 '16 at 16:24
  • I wish that I could be of more help, but I fear that I don't remember what the exact issue was. And, it's a shame that neither of those links are still up as I recall that both of them were super helpful. – Eric Mar 04 '16 at 20:09

0 Answers0