FIX: typo in jwt token validation
parent
972e6719e9
commit
a5fbb94162
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue