token-verify-att 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3,8 +3,7 @@ const cache = require("node-cache");
3
3
 
4
4
  const tokenCache = new cache({ stdTTL: 3600 }); // Cache con tiempo de vida de 1 hora
5
5
 
6
- async function getToken(req) {
7
- const body = req.body;
6
+ async function getToken(body) {
8
7
  const cachedToken = tokenCache.get(body.token_key);
9
8
  console.log("Usando token en caché");
10
9
  if (cachedToken && cachedToken.expires_at > Date.now()) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "token-verify-att",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private" : false,
5
5
  "description": "Libreria para verificar tokens de autenticación",
6
6
  "main": "index.js",