Authenticate requests using the ltik token
masterFor requests not directed at reserved endpoints, Ltijs validates them by matching a session cookie with an ltik JWT token. The ltik token must be provided in one of the following ways (in this order of priority):
- LTIK-AUTH-V1 Authorization header:
Authorization: LTIK-AUTH-V1 Token=<ltik>, Additional=<additional> - Query parameter:
https://tool.com?ltik=<ltik> - Request body:
{ "ltik": "<ltik>" } - Bearer Authorization header:
Authorization: Bearer <ltik>
When using LTIK-AUTH-V1, req.headers.authorization will only contain the Additional portion, while the ltik is available in req.token.
// Example LTIK-AUTH-V1 header
// Authorization: LTIK-AUTH-V1 Token=eyJhbGci... , Additional=Bearer KxwRJS...