FIX: typo in jwt token validation

pull/4/head
Florian Brede 2021-05-21 17:41:38 +02:00
parent 972e6719e9
commit a5fbb94162
1 changed files with 2 additions and 2 deletions

View File

@ -3,9 +3,9 @@ const jwt = require('jsonwebtoken');
async function validateJWT(JWT, key) {
async function validateJWT(token, key) {
try {
return jwt.verify(jwt.replace("JWT ", ""), key, {algorithms: ['RS256']});
return jwt.verify(token.replace("JWT ", ""), key, {algorithms: ['RS256']});
} catch (exception) {
// TODO add logger to authentication controller
//logger.error(exception);