title: How to authenticate moodle LTI launch request
body: <p>I've created a LTI tool that I'm integrating with moodle. I have created a consumer key and secret but I'm unsure how do I validate (authenticate) the launch request.</p>
  
  <p>Here is the raw request that I'm receiving, so I'm guessing I need to validate the oauth_signature to authenticate the request. I've come across some examples but I need the oauth token too, but it's not returned in the launch request.</p>
  
  <p>I would really appreciate any help! </p>
  
  <pre><code>POST http://ltitest.cloudapp.net/launch HTTP/1.1
  Host: ltitest.cloudapp.net
  User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
  Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  Accept-Language: en-US,en;q=0.5
  Accept-Encoding: gzip, deflate
  Referer: http://demo.moodle.net/mod/lti/launch.php?id=7
  Connection: keep-alive
  Content-Type: application/x-www-form-urlencoded
  Content-Length: 1296
  
  oauth_version=1.0&amp;oauth_nonce=d8e900f0b71e76c4b12e89681c9b5cb9&amp;oauth_timestamp=1412987714&amp;oauth_consumer_key=username&amp;resource_link_id=1&amp;resource_link_title=tool&amp;resource_link_description=&amp;user_id=2&amp;roles=Instructor%2Curn%3Alti%3Asysrole%3Aims%2Flis%2FAdministrator&amp;context_id=2&amp;context_label=My+first+course&amp;context_title=My+first+course&amp;launch_presentation_locale=en&amp;lis_result_sourcedid=%7B%22data%22%3A%7B%22instanceid%22%3A%221%22%2C%22userid%22%3A%222%22%2C%22launchid%22%3A449414780%7D%2C%22hash%22%3A%2226f6510ff6e91e1a7814805190c01a9e9d02575de135d7a1483a70626bae8782%22%7D&amp;lis_outcome_service_url=http%3A%2F%2Fdemo.moodle.net%2Fmod%2Flti%2Fservice.php&amp;lis_person_name_given=Admin&amp;lis_person_name_family=User&amp;lis_person_name_full=Admin+User&amp;lis_person_contact_email_primary=demo%40moodle.a&amp;ext_lms=moodle-2&amp;tool_consumer_info_product_family_code=moodle&amp;tool_consumer_info_version=2014051202&amp;oauth_callback=about%3Ablank&amp;lti_version=LTI-1p0&amp;lti_message_type=basic-lti-launch-request&amp;tool_consumer_instance_guid=demo.moodle.net&amp;launch_presentation_return_url=http%3A%2F%2Fdemo.moodle.net%2Fmod%2Flti%2Freturn.php%3Fcourse%3D2%26launch_container%3D3%26instanceid%3D1&amp;oauth_signature_method=HMAC-SHA1&amp;oauth_signature=JmFLDbhi%2FstYEFTSNA%2F44biCQkM%3D&amp;ext_submit=Press+to+launch+this+activity
  </code></pre>