Use secretKey module directly
This commit is contained in:
@ -90,14 +90,9 @@ function removeAllRevokedTokens() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPublicKey() {
|
|
||||||
return secretKey.public;
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
createToken,
|
createToken,
|
||||||
verifyToken,
|
verifyToken,
|
||||||
revokeToken,
|
revokeToken,
|
||||||
removeAllRevokedTokens,
|
removeAllRevokedTokens
|
||||||
getPublicKey
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
const AuthAPI = require("../AuthAPI");
|
const secretKey = require("../secretKey");
|
||||||
|
|
||||||
function showPublicKey(req, res) {
|
function showPublicKey(req, res) {
|
||||||
res.send({ publicKey: AuthAPI.getPublicKey() });
|
res.send({ publicKey: secretKey.public });
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = showPublicKey;
|
module.exports = showPublicKey;
|
||||||
|
|||||||
Reference in New Issue
Block a user