@dotrino/vault 0.1.0 → 0.1.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/package.json +1 -1
  2. package/src/index.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotrino/vault",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Usa ESTE dispositivo (navegador) como bóveda/CA del ecosistema Dotrino: atiende enrolamientos por el proxy y firma certificados de delegación a tus máquinas. Contraparte browser del daemon dotrino-vault, reutilizable por cualquier app.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -205,7 +205,7 @@ export async function startDeviceVault (identity, { proxyUrl } = {}) {
205
205
  const now = Date.now()
206
206
  const bySub = new Map()
207
207
  for (const x of (issued || [])) {
208
- if (!x.sub || (x.exp && x.exp <= now)) continue
208
+ if (!x.sub || x.revokedAt || (x.exp && x.exp <= now)) continue // revocada = fuera de la lista
209
209
  if (!Array.isArray(x.scope) || !x.scope.includes(SIGN_SCOPE)) continue
210
210
  if (!x.label || x.label === 'cli') continue
211
211
  if (!bySub.has(x.sub) || (x.exp || 0) > (bySub.get(x.sub).exp || 0)) bySub.set(x.sub, x)