this is a little (a lot) late but it might help someone else.
I have create a nodejs implementation of the Lti 1.3 advantage protocol that makes it super easy to setup a lti provider.
Ltijs
Here's a quick example of usage:
const path = require('path')
// Require Provider
const Lti = require('ltijs').Provider
// Configure provider
const lti = new Lti('EXAMPLEKEY',
{ url: 'mongodb://localhost/database',
connection:{ user:'user',
pass: 'pass'}
},
{ staticPath: path.join(__dirname, '/views/') })
let setup = async () => {
// Configure main routes
lti.appUrl('/')
lti.loginUrl('/login')
// Deploy and open connection to the database
await lti.deploy()
// Register platform
let plat = await lti.registerPlatform(
'http://platform/url',
'Platform Name', 'ClientIdThePlatformCreatedForYourApp',
'http://platform/AuthorizationUrl',
'http://platform/AccessTokenUrl',
{ method: 'JWK_SET', key: 'http://platform/keyset' }
)
// Set connection callback
lti.onConnect((connection, request, response) => {
// Call redirect function
lti.redirect(response, '/main')
})
// Set route accounting for issuer context
lti.app.get('/:iss/main', (req, res) => {
// Id token
console.log(res.locals.token)
res.send('It\'s alive!')
})
}
setup()