Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

oauth1 signature

node v8.17.0
version: 1.0.0
endpointsharetweet
const oauthSignature = require("oauth-signature"); const httpMethod = 'POST'; const url = 'https://api.gsstaging.net/auth/v1/lti'; const parameters = { oauth_consumer_key : 'HXrELHMgQ5nyst7LK', oauth_nonce : '89b13cb1fa14cd6dc372b5728588a5cf', oauth_timestamp : '1526546378', oauth_signature_method : 'HMAC-SHA1', oauth_version : '1.0', context_id: 'c595d3c8380e34c32bc6bddc23950be0', context_label: 'Host:+shelf+Course:+1', launch_presentation_document_target: 'iframe', launch_presentation_return_url: 'https://shelf.bridgeapp.com/author/courses/1', lti_message_type: 'basic-lti-launch-request', lti_version: 'LTI-1p2', oauth_callback: 'about:blank', resource_link_id: 'a7c1e52e23bbb372a305cb84af57560b', roles: 'administrator', tool_consumer_info_product_family_code: 'Bridge', tool_consumer_instance_contact_email: '', tool_consumer_instance_guid: 'shelf.bridgeapp.com', tool_consumer_instance_name: 'Shelf', user_id: 'cbfb8ba8-ad34-4fde-8c5c-8dab6303c5d0', resource_link_description: 'The+Knowledge+Base+with+the+Best+Search+in+the+Industry++Launched+from+the+course+tab+(course_id+=+1).', lis_person_contact_email_primary: 'vitalii@shelf.io', tool_consumer_instance_url: 'https://shelf.bridgeapp.com' }; const consumerSecret = 'zGCenEZx9CvTwAhNp'; const encodedSignature = oauthSignature.generate(httpMethod, url, parameters, consumerSecret); console.log('encodedSignature', encodedSignature); console.log('right sign', 'eQf1Shcq9nYFD1vB2PHLtAlWyRU%3D');
Loading…

no comments

    sign in to comment