{"_id":"@annoto/ims-lti","_rev":"9-050c6abefa7fd8f563d4660eacf7e05b","name":"@annoto/ims-lti","dist-tags":{"latest":"3.0.6"},"versions":{"3.0.2":{"name":"@annoto/ims-lti","version":"3.0.2","keywords":["ims","lti","provider"],"author":{"name":"James Rundquist","email":"james@courseshark.com"},"license":"MIT","_id":"@annoto/ims-lti@3.0.2","maintainers":[{"name":"genadi","email":"Genadi@annoto.net"}],"contributors":[{"name":"Owen Smith","email":"owen@omsmith.ca"},{"name":"David Kosub","email":"dave@davidkosub.com"}],"homepage":"https://github.com/omsmith/ims-lti#readme","bugs":{"url":"http://github.com/omsmith/ims-lti/issues"},"dist":{"shasum":"420ff54a156a11557ad96f7bcbd21cc7d20a76e7","tarball":"https://registry.npmjs.org/@annoto/ims-lti/-/ims-lti-3.0.2.tgz","fileCount":15,"integrity":"sha512-lhvw2nGoLmSYhHohht8akM7yP6czLmD0qi5etHhAVLtitMdW0Vvd6g2klOMB0KzqHkzflOCYqMftR81qB2It+A==","signatures":[{"sig":"MEYCIQDtdOUprmhBpMHEEh5hwPful54BOuaG4dAYGgRgl2j0rwIhAKnmoGBLrEyVH7K4JK5/0+ftK4cneIyJ8zWdcLCBkjHb","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNdspCRA9TVsSAnZWagAAHF0P/05OsgrAiP9qZidBQlr7\n+60lfxx+tteEFlJZB3cFkV7+WUADc8Jlr0GFUEth/crj04RZ78olB2l6klxh\nx7Zbu6/vfSORl2vhoTKqQQt3czsYXpQaLDv1SDvRjHSQyVx142gFPLEjjcL9\nUiCp1WwH/SDxFFhvCM7h1Wl+hPlLYxhM8iR4pnUJBLTFB8nNaS+tL8ovdm4e\nUtt9SkBHOb47w0k1A1j5VuzsL7NHxDDpdE0Rf+C7qr3EFfY4TlbB6XnIBGqf\nPsrUYYbSZS5xtr6AUL1GutNdklbWbQ4AFllyru5TCme4qoPPH7ZKYCfWFSXQ\na6pU9c72U1kezM9b1IYBld+4ahASbcHVWMjew+onv9sfEv8YCXBySRbZSZex\nP7BxkTOefAuw9vTdRw/9YoKbvcR2NhOKJjE3I6A5Zz1sTDApzssdQ1cAZqvC\ngElrHbZOwUbvJVnH/q7cleSo5gg4wpbsf1YOU0CiUslFP4EJVb0Vuli0F5On\nMGVMBtVf4SBlhLXJcYr6KShHmwvDkAq7E9mAiwY2nxhY64IZDtg3knsx8p4a\nq0K4xCIVuHUyH8Fo8HPA0y2SL6287v8/zJLzLL7r6YKhdFdeLXX7hx6JcnMp\nI3O447I08VTx9Jqzm+WkMrp5HXsYrZyrNwxDccHadzvzUqUU/B53Nw5FJA26\ncbtP\r\n=fc7O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./src/ims-lti","gitHead":"412d773413ad863e3a9b739e5d0a46426debcab4","scripts":{"lint":"eslint .","test":"nyc mocha --exit","coverage":"nyc report --reporter=text-lcov | coveralls","prettier":"prettier --write --trailing-comma es5 --single-quote ./src"},"_npmUser":{"name":"genadi","email":"Genadi@annoto.net"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/omsmith/ims-lti.git","type":"git"},"_npmVersion":"6.4.1","description":"Module for building an LTI Tool Provider and accept LTI launch requests","directories":{},"_nodeVersion":"8.9.3","dependencies":{"uuid":"^3.3.2","xml2js":"^0.4.19","xmlbuilder":"^10.1.1"},"eslintConfig":{"env":{"es6":true,"node":true,"mocha":true},"extends":"eslint:recommended"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.1.0","mocha":"^5.2.0","redis":"^2.8.0","eslint":"^5.11.0","should":"^13.2.3","prettier":"^1.15.3","coveralls":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/ims-lti_3.0.2_1547033384555_0.7136058350350774","host":"s3://npm-registry-packages"}},"3.0.3":{"name":"@annoto/ims-lti","version":"3.0.3","keywords":["ims","lti","provider"],"author":{"name":"James Rundquist","email":"james@courseshark.com"},"license":"MIT","_id":"@annoto/ims-lti@3.0.3","maintainers":[{"name":"genadi","email":"Genadi@annoto.net"}],"contributors":[{"name":"Owen Smith","email":"owen@omsmith.ca"},{"name":"David Kosub","email":"dave@davidkosub.com"}],"homepage":"https://github.com/omsmith/ims-lti#readme","bugs":{"url":"http://github.com/omsmith/ims-lti/issues"},"dist":{"shasum":"d581c72c4c2b166eaf80edee19ee698a31fc1b37","tarball":"https://registry.npmjs.org/@annoto/ims-lti/-/ims-lti-3.0.3.tgz","fileCount":15,"integrity":"sha512-nOUWgQDbK36qw5Cfky/6LEkj0Yg2iBMfoaZrizPtRkIrgt8pjkNCad2M0yzSMa/blcWNK5GeIeLks7bAviSl+Q==","signatures":[{"sig":"MEYCIQDumcGl9MNToIgxWi2XcS7uoUUV6ZaWlTZo6cWpqwb8QgIhAKgLmm2Fo/Z4o8ZuyuIsfS+jwlHzuLo2YLxWM1aGY6Fa","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41426,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJft+DNCRA9TVsSAnZWagAAOWQP+gM7M0uu12ZdVPqw8PJu\n3xtUbrS14jjbUxAdcNfidr2xZt6zYXoRta2krch3kOIJX0HdfXKLJc5qoJPH\ng+ZF6gIdW8/4URIDmeqDScCIdAQeUEQ59pQYRW8/4gO6I0aFeNHKduDxxgon\nVPkhSbtNUSBe7xfu5I+gFbdYy+zp9wP8j0X3qYMD/bzLsIVDmXN0DYmAWYz1\nBor3jGrIGBIuzOTeufW4UxbIiTRPkQygnny77wN5yNHPrIlXA7iZvn18qZZ1\niOv9jsQ+nAyRIjqYWej7dQk6CGJf4X+K8wCnFWLPJysViOFAafrCyBVChhay\nQus9n2pcvzsL7VJfRUGG0OXl5qEIWUyAZaYxo16kdV70wmpNwLJptW8uI7WI\nlUZ8nHUx8NSOjKU1XxoOblr29grTrdQf9m2QjiL9/Pr5UWamYKUKOeXvMWvk\noYDRvGHZminjHLiv4BpLpZtRSAZgWpfrj6FtzgFi478IdTAnJBAF5d0X/J71\nYofyHn0hP15qu8eJMQHxq0qyhd+9oPNwrM2YarqZh2cDYkcEptfWTpl0uXtl\no3FXujzalBA0WZQ5UCARuGbClYCNGqqInWIn19mY/LHULxKKsaVN0KRfUBbN\naD1mty43rM8DtMiXTiMQidurifaXqmTwBM5L3coSgpfcaevjTh9o6nGqpsvf\nhJx+\r\n=sknu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./src/ims-lti","gitHead":"b4b5a68c744fcb36a19818d878d76135c789d733","scripts":{"lint":"eslint .","test":"nyc mocha --exit","coverage":"nyc report --reporter=text-lcov | coveralls","prettier":"prettier --write --trailing-comma es5 --single-quote ./src"},"_npmUser":{"name":"genadi","email":"Genadi@annoto.net"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/omsmith/ims-lti.git","type":"git"},"_npmVersion":"6.13.4","description":"Module for building an LTI Tool Provider and accept LTI launch requests","directories":{},"_nodeVersion":"12.14.1","dependencies":{"uuid":"^3.3.2","xml2js":"^0.4.19","xmlbuilder":"^10.1.1"},"eslintConfig":{"env":{"es6":true,"node":true,"mocha":true},"extends":"eslint:recommended"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.1.0","mocha":"^5.2.0","redis":"^3.0.0","eslint":"^5.11.0","should":"^13.2.3","prettier":"^1.15.3","coveralls":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/ims-lti_3.0.3_1605886156546_0.6538112267085463","host":"s3://npm-registry-packages"}},"3.0.4":{"name":"@annoto/ims-lti","version":"3.0.4","keywords":["ims","lti","provider"],"author":{"name":"James Rundquist","email":"james@courseshark.com"},"license":"MIT","_id":"@annoto/ims-lti@3.0.4","maintainers":[{"name":"genadi","email":"Genadi@annoto.net"}],"contributors":[{"name":"Owen Smith","email":"owen@omsmith.ca"},{"name":"David Kosub","email":"dave@davidkosub.com"},{"name":"Genadi Sokolov","email":"genadi@annoto.net"}],"homepage":"https://github.com/Annoto/ims-lti#readme","bugs":{"url":"https://github.com/Annoto/ims-lti/issues"},"dist":{"shasum":"6ac83ef1062c8ad6cee922b0e3a1d183fcd35486","tarball":"https://registry.npmjs.org/@annoto/ims-lti/-/ims-lti-3.0.4.tgz","fileCount":15,"integrity":"sha512-o+kDq9a/doSYSP5WKew4bRNNgQDliBGwJWPZsKHxak0cdutyE/25kL6bsLTn4GfSHejYJmGwstnVu+df95Ak6w==","signatures":[{"sig":"MEYCIQD3s5N0DzjGbCvqR+Pb7TQuBH5srd8UKQOPBTz1H+KfHgIhAPNyWRl0lQ1P6SHVm9+WuQnYKimGOPxJUf0iKkbskKZj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41769,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCn9pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrfUA//RsDs9GaOVl6UnSSRVhlwuCFyRIKCuLY2jcm5E7gqPTB9iKEl\r\nt0Xu39rkar4IAOHjY/uiwR+glxbsDScJYXNhTxTlaFfhybKNY9uf1Mvcm/79\r\nybCFQFLkqtuLCKgph4RRWD5yLaL+ohWSthAxDfHwY+spGBZWR9vWTqua7ihA\r\n35YUAJwiEbA525aLoWw+ixOj38jj7fHEK/4NwVh+8Vlr/DecxPJ+Fk3Xl6J2\r\npTlOtXUqvgcvBnVW+xjlTQiN2pA56nzr4+ylFR/c2QPb5klRJ/QBYZD79yZd\r\nYRb33+dQM1ICCd7KcEok90j6ddDG0L0gaUuYEm+TBsZYDpcznKjLiEegtG3t\r\nHZXFUAT3UzvWePOAGs8boJHYJzpDSgKETHnWbiuEOSJkMwjIqc70kseSp9Jy\r\n1pf3cTFYuDx5UTsBHofGKuSc4B1sdfHEoiPYv4tAJaDW9DOU52aFJZwARxf4\r\ny+uaHmPzkQDipDiZgEb+4jOR/i83T3Grd3biDjkEUtvMWonnGZoNLGi0utDX\r\nlK3iywu9tW2DGf1zrZc0KQi1ln1P2+mgYfhPuh/4QMzhcJkBWZ5g6mvN9/2B\r\nx2Yh4ov0rXmb1RWlcQZBs99+MXolXY+QhgUTe9Nz6NoJqztdk1k6of6zUY+L\r\nmY80iI0VwsedKPhIbsCI8oYlTSpGsJ4a2vg=\r\n=a1YI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./src/ims-lti","gitHead":"8dcb4e557d9970966cfbebd4c50b573e9fe3229c","scripts":{"lint":"eslint .","test":"nyc mocha --exit","coverage":"nyc report --reporter=text-lcov | coveralls","prettier":"prettier --write --trailing-comma es5 --single-quote ./src"},"_npmUser":{"name":"genadi","email":"Genadi@annoto.net"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/Annoto/ims-lti.git","type":"git"},"_npmVersion":"8.11.0","description":"Module for building an LTI Tool Provider and accept LTI launch requests","directories":{},"_nodeVersion":"16.15.1","dependencies":{"uuid":"^3.3.2","xml2js":"^0.4.19","xmlbuilder":"^10.1.1"},"eslintConfig":{"env":{"es6":true,"node":true,"mocha":true},"extends":"eslint:recommended"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.1.0","mocha":"^5.2.0","redis":"^3.0.0","eslint":"^5.11.0","should":"^13.2.3","prettier":"^1.15.3","coveralls":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/ims-lti_3.0.4_1661632360987_0.564893177913057","host":"s3://npm-registry-packages"}},"3.0.5":{"name":"@annoto/ims-lti","version":"3.0.5","keywords":["ims","lti","provider"],"author":{"name":"James Rundquist","email":"james@courseshark.com"},"license":"MIT","_id":"@annoto/ims-lti@3.0.5","maintainers":[{"name":"genadi","email":"Genadi@annoto.net"}],"contributors":[{"name":"Owen Smith","email":"owen@omsmith.ca"},{"name":"David Kosub","email":"dave@davidkosub.com"},{"name":"Genadi Sokolov","email":"genadi@annoto.net"}],"homepage":"https://github.com/Annoto/ims-lti#readme","bugs":{"url":"https://github.com/Annoto/ims-lti/issues"},"dist":{"shasum":"411334bfb3b3b4ffe042a06208d9aaf6b5e87b3f","tarball":"https://registry.npmjs.org/@annoto/ims-lti/-/ims-lti-3.0.5.tgz","fileCount":15,"integrity":"sha512-qC/a7dsV8zx7D1CaFCVsi6EAn5FHZBxoZIN2HQxIanJfi2sfVjgyDdmhX1+9ZUS/OXKUh69w/8TdR3OHaESrvg==","signatures":[{"sig":"MEUCIQDRckpBZc1rK6TY/pGbtC2JsLsl70GnpYEwlI1cHZDjsAIgC0jHqxe7pgX/hsLXDOD9JReS3J3febOkFa5OeUfv8kw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42063},"main":"./src/ims-lti","gitHead":"f2ee73dd755938af00f74d2ab7a73f04021cce61","scripts":{"lint":"eslint .","test":"nyc mocha --exit","coverage":"nyc report --reporter=text-lcov | coveralls","prettier":"prettier --write --trailing-comma es5 --single-quote ./src"},"_npmUser":{"name":"genadi","email":"Genadi@annoto.net"},"prettier":{"singleQuote":true,"trailingComma":"es5"},"repository":{"url":"git+https://github.com/Annoto/ims-lti.git","type":"git"},"_npmVersion":"9.5.0","description":"Module for building an LTI Tool Provider and accept LTI launch requests","directories":{},"_nodeVersion":"18.15.0","dependencies":{"uuid":"^3.3.2","xml2js":"^0.4.19","xmlbuilder":"^10.1.1"},"eslintConfig":{"env":{"es6":true,"node":true,"mocha":true},"extends":"eslint:recommended"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.1.0","mocha":"^5.2.0","redis":"^3.0.0","eslint":"^5.11.0","should":"^13.2.3","prettier":"^1.15.3","coveralls":"^3.0.2"},"_npmOperationalInternal":{"tmp":"tmp/ims-lti_3.0.5_1697538584851_0.3506551050361426","host":"s3://npm-registry-packages"}},"3.0.6":{"name":"@annoto/ims-lti","version":"3.0.6","description":"Module for building an LTI Tool Provider and accept LTI launch requests","author":{"name":"James Rundquist","email":"james@courseshark.com"},"contributors":[{"name":"Owen Smith","email":"owen@omsmith.ca"},{"name":"David Kosub","email":"dave@davidkosub.com"},{"name":"Genadi Sokolov","email":"genadi@annoto.net"}],"license":"MIT","keywords":["ims","lti","provider"],"repository":{"type":"git","url":"git+https://github.com/Annoto/ims-lti.git"},"bugs":{"url":"https://github.com/Annoto/ims-lti/issues"},"main":"./src/ims-lti","scripts":{"coverage":"nyc report --reporter=text-lcov | coveralls","lint":"eslint .","test":"nyc mocha --exit","prettier":"prettier --write --trailing-comma es5 --single-quote ./src","postinstall":"npx rimraf node_modules/xml2js/lib/xml2js.bc.js"},"dependencies":{"xml2js":"^0.6.2","xmlbuilder":"^10.1.1","uuid":"^3.3.2"},"devDependencies":{"coveralls":"^3.0.2","eslint":"^5.11.0","mocha":"^5.2.0","nyc":"^13.1.0","redis":"^3.0.0","should":"^13.2.3","prettier":"^1.15.3"},"eslintConfig":{"extends":"eslint:recommended","env":{"es6":true,"mocha":true,"node":true}},"prettier":{"singleQuote":true,"trailingComma":"es5"},"_id":"@annoto/ims-lti@3.0.6","gitHead":"54f1280cf5f36f00342ee4e72fbb7c62e25cba4b","homepage":"https://github.com/Annoto/ims-lti#readme","_nodeVersion":"22.9.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-XAgJo6tecFuZH+Wzlw4kpZH+K0CgjimSnvSYbarV8nI4/ra2Xr/MK8ZLuLo/QRvgwoq2hjy+1MA2jqMi2xKLWw==","shasum":"3c4b454c3d8b2199068c448aff5aa04cf7ef7329","tarball":"https://registry.npmjs.org/@annoto/ims-lti/-/ims-lti-3.0.6.tgz","fileCount":15,"unpackedSize":42132,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCc6/qWha+TDcm5mth+fkFesmEPpt5wnxn0tr4AHRc+iwIhAP7upLHduSCcmEW1Juk2lsqfErYEbZ40Vrao7nabcGxM"}]},"_npmUser":{"name":"genadi","email":"Genadi@annoto.net"},"directories":{},"maintainers":[{"name":"genadi","email":"Genadi@annoto.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ims-lti_3.0.6_1750076387767_0.6117525487044659"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-09T11:29:44.554Z","modified":"2025-06-16T12:19:48.192Z","3.0.2":"2019-01-09T11:29:44.741Z","3.0.3":"2020-11-20T15:29:16.722Z","3.0.4":"2022-08-27T20:32:41.197Z","3.0.5":"2023-10-17T10:29:45.059Z","3.0.6":"2025-06-16T12:19:47.955Z"},"bugs":{"url":"https://github.com/Annoto/ims-lti/issues"},"author":{"name":"James Rundquist","email":"james@courseshark.com"},"license":"MIT","homepage":"https://github.com/Annoto/ims-lti#readme","keywords":["ims","lti","provider"],"repository":{"type":"git","url":"git+https://github.com/Annoto/ims-lti.git"},"description":"Module for building an LTI Tool Provider and accept LTI launch requests","contributors":[{"name":"Owen Smith","email":"owen@omsmith.ca"},{"name":"David Kosub","email":"dave@davidkosub.com"},{"name":"Genadi Sokolov","email":"genadi@annoto.net"}],"maintainers":[{"name":"genadi","email":"Genadi@annoto.net"}],"readme":"# ims-lti\n\n[![Build Status](https://travis-ci.org/omsmith/ims-lti.svg?branch=master)](https://travis-ci.org/omsmith/ims-lti)\n[![Coverage Status](https://coveralls.io/repos/omsmith/ims-lti/badge.png)](https://coveralls.io/r/omsmith/ims-lti)\n[![dependencies Status](https://david-dm.org/omsmith/ims-lti/status.svg)](https://david-dm.org/omsmith/ims-lti)\n[![devDependencies Status](https://david-dm.org/omsmith/ims-lti/dev-status.svg)](https://david-dm.org/omsmith/ims-lti?type=dev)\n\nThis is a nodejs library used to help create Tool Providers for the\n[IMS LTI standard](http://www.imsglobal.org/lti/index.html). Tool Consumer implmentation is left as an excersise to the reader :P\n\n## Install\n\n```shell\nnpm install ims-lti --save\n```\n\nTo require the library into your project\n\n```javascript\nrequire('ims-lti')\n```\n\n## Supported LTI Versions\n\n* 1.0 - [Implementation Guide](http://www.imsglobal.org/lti/blti/bltiv1p0/ltiBLTIimgv1p0.html)\n* 1.1 - [Implementation Guide](http://www.imsglobal.org/LTI/v1p1/ltiIMGv1p1.html)\n* 1.1.1 - [Implementation Guide](http://www.imsglobal.org/LTI/v1p1p1/ltiIMGv1p1p1.html)\n\n## Usage\n\nThe LTI standard won't be covered here, but it would be good to familiarize yourself with the specs. [LTI documentation](http://www.imsglobal.org/lti/index.html)\n\nThis library doesn't help you manage or distribute the consumer keys and secrets. The POST\nparameters will contain the `oauth_consumer_key` and your application should use that to look up the consumer secret from your own datastore.\n\nThis library offers a few interfaces to use for managing the OAuth nonces to make sure the same nonce\nisn't used twice with the same timestamp. [Read the LTI documentation on OAuth](http://www.imsglobal.org/LTI/v1p1pd/ltiIMGv1p1pd.html#_Toc309649687). They will be covered below.\n\n### Setting up a Tool Provider (TP)\nAs a TP your app will receive a POST request with [LTI launch data](http://www.imsglobal.org/lti/v1p1pd/ltiIMGv1p1pd.html#_Toc309649684) that will be signed with OAuth using a key/secret that both the TP and Tool Consumer (TC) share. This is all covered in the [LTI security model](http://www.imsglobal.org/lti/v1p1pd/ltiIMGv1p1pd.html#_Toc309649685)\n\nOnce you find the `oauth_consumer_secret` based on the `oauth_consumer_key` in the POST request, you can initialize a `Provider` object with them and a few other optional parameters:\n\n```javascript\nconst { Provider } = require('ims-lti');\n\nprovider = new Provider(consumer_key, consumer_secret, [nonce_store=MemoryStore], [signature_method=HMAC_SHA1])\n```\n\nOnce the provider has been initialized, a reqest object can be validated against it. During validation, OAuth signatures are checked against the passed consumer_secret and signautre_method ( HMAC_SHA1 assumed ). isValid returns true if the request is an lti request and is properly signed.\n\n```javascript\nprovider.valid_request(req, (err, isValid) => {\n  // isValid = Boolean | always false if err\n  // err = Error object with method descibing error if err, null if no error\n})\n```\n\nAfter validating the reqest, the provider object both stores the requests parameters (excluding oauth parameters) and provides convinience accessors to common onces including `provider.student`, `provider.ta`, `provider.username`, and more. All request data can be accessed through `provider.body` in an effort to namespace the values.\n\nCurrently there is not an emplementation for posting back to the Tool Consumer, although there is a boolean accessor `provider.outcome_service` that will return true if the TC will accept a POSTback.\n\n### Nonce Stores\n\n`ims-lti` does not standardize the way in which the OAuth nonce/timestamp is to be stored. Since it is a crutial part of OAuth security, this library implements an Interface to allow the user to implement their own nonce-stores.\n\n#### Nonce Interface\nAll custom Nonce stores should extend the NonceStore class and implment `isNew` and `setUsed`\n\n```javascript\nclass NonceStore\n  isNew(nonce, timestamp, callback) {}\n  setUsed(nonce, timestamp, callback) {\n    // Sets any new nonce to used\n  }\n```\n\nTwo nonce stores have been implemented for convinience.\n\n#### MemoryNonceStore\nThe default nonce store (if none is specified) is the Memory Nonce Store. This store simply keeps an array of nocne/timestamp keys. Timestamps must be valid within a 5 minute grace period.\n\n#### RedisNonceStore\nA superior nonce store is the RedisNonceStore. This store requires a secondary input into the constructor, a redis-client. The redis client is used to store the nonce keys and set them to expire within a set amount of time (default 5 minutes). A RedisNonceStore is initialized like:\n\n```javascript\nconst RedisNonceStore = require('../src/redis-nonce-store')\nconst client          = require('redis').createClient()\nconst store           = new RedisNonceStore('consumer_key', client)\n\nconst provider = new Provider(consumer_key, consumer_secret, store)\n```\n\n### Outcomes Extension\n\nThe outcomes feature is part of the LTI 1.1 specification and is new to ims-lti 1.0. All of the behind-the-scenes work necessary to get the ball rolling with it is already implemented for you, all you need to do is submit grades.\n\n```javascript\nconst provider = new Provider(consumer_key, consumer_secret)\n\nprovider.valid_request(req, (err, is_valid) => {\n  // Check if the request is valid and if the outcomes service exists.\n  if (!is_valid || !provider.outcome_service) return false\n\n  // Check if the outcome service supports the result data extension using the\n  // text format. Available formats include text and url.\n  console.log provider.outcome_service.supports_result_data('text')\n\n  // Replace accepts a value between 0 and 1.\n  // Log value will be True or false\n  provider.outcome_service.send_replace_result(0.5, (err, result) => console.log(result))\n\n  // Value of the result already submitted from this embed\n  provider.outcome_service.send_read_result((err, result) => console.log(result))\n\n  // Log value will be True or false\n  provider.outcome_service.send_delete_result((err, result) => console.log(result))\n\n  // Log value will be True or false\n  provider.outcome_service.send_replace_result_with_text(0.5, 'Hello, world!', (err, result) => console.log(result))\n\n  // Log value will be True or false\n  provider.outcome_service.send_replace_result_with_url(0.5, 'https://google.com', (err, result) => console.log(result))\n})\n```\n\n### Content Extension\n\nThe content extension is an extension supported by most LMS platforms. It provides LTI providers a way to send content back to the LMS in the form of urls, images, files, oembeds, iframes, and even lti launch urls.\n\n```javascript\nprovider = new Provider consumer_key, consumer_secret\n\nprovider.valid_request (req, (err, is_valid) => {\n  // check if the request is valid and if the content extension is loaded.\n  if (!is_valid || !provider.ext_content) return false\n\n  provider.ext_content.has_return_type('file') // Does the consumer support files\n  provider.ext_content.has_file_extension('jpg') // Does the consumer support jpg\n\n  // All send requests take a response object as the first parameter. How the\n  // response object is manipulated can be overrided by replacing\n  // lti.Extensions.Content.redirector with your own function that accepts two\n  // parameters, the response object and the url to redirect to.\n  provider.ext_content.send_file(res, file_url, text, content_mime_type)\n\n  provider.ext_content.send_iframe(res, iframe_url, title_attribute, width, height)\n\n  provider.ext_content.send_image_url(res, image_url, text, width, height)\n\n  provider.ext_content.send_lti_launch_url(res, launch_url, title_attribute, text)\n\n  provider.ext_content.send_oembed(res, oembed_url, endpoint)\n\n  provider.ext_content.send_url(res, hyperlink_url, text, title_attribute, target_attribute)\n})\n```\n\n## Running Tests\nTo run the test suite first installing the dependencies:\n\n```shell\nnpm install\nnpm test\n```\n","readmeFilename":"README.md"}