我正在尝试使用LTI将LMS(Canvas)与我的第三方学习工具集成。作为整个过程的一部分,我正在接受Canvas发送给我的Request变量:
Array ( [oauth_consumer_key] => key
[oauth_nonce] => s78gkWprnVJ6qp2UaCaEZ39WoYm91yOztiCBRhDx7s
[oauth_signature] => l82UMpiOt62vTd7Eu4GzyVVxYk0=
[oauth_signature_method] => HMAC-SHA1
[oauth_timestamp] => 1367072335 [oauth_version] => 1.0 )
并通过标题将它们发送到我的“request_token.php”脚本(taken from google's oAuth code)。结果是无效签名。我已经在本地测试了代码,但是当我不从我的LMS中提取信息时它似乎工作正常。我将var_dumped OAuthRequest对象作为进一步表明OAuthRequest实际上正在使用正确的变量。
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 )
可能需要一些额外的步骤,需要使用LTI变量来使其工作吗? (我尝试编码但没有用)