I am trying to use LTI to integrate LMS (Canvas) with my third-party training tool. As part of the process, I take the Request variables passed to me by the 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 through the header to your "request_token.php" script ( from google oAuth code ). The result is an invalid signature. However, I checked the code on the local computer, and it seems to work fine when it does not extract information from my LMS. I var_dumped the OAuthRequest object as another indication that it looks like OAuthRequest is actually 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 )
Could there be some extra step to take with LTI variables to make it work? (I tried to code them, but to no avail)
source share