src/api/route/token.js
Function tokenRoutes
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const tokenRoutes = (app, config, tokenAuth, jsonld, sendHttpProblem) => {
app.post('/api/token/verify', (req, res) => Promise
.try(() => {
const match = req.headers.authorization && req.headers.authorization.match(/^Bearer (.+)/)
if (!match[1]) return res.status(400).send()