@jjlmoya/utils-developer 1.16.0 → 1.17.0

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 (34) hide show
  1. package/package.json +1 -1
  2. package/src/category/index.ts +2 -1
  3. package/src/entries.ts +4 -1
  4. package/src/index.ts +2 -0
  5. package/src/tests/locale_completeness.test.ts +2 -2
  6. package/src/tests/tool_validation.test.ts +2 -2
  7. package/src/tool/jwtDecoder/bibliography.astro +14 -0
  8. package/src/tool/jwtDecoder/bibliography.ts +12 -0
  9. package/src/tool/jwtDecoder/component.astro +209 -0
  10. package/src/tool/jwtDecoder/entry.ts +30 -0
  11. package/src/tool/jwtDecoder/i18n/de.ts +248 -0
  12. package/src/tool/jwtDecoder/i18n/en.ts +247 -0
  13. package/src/tool/jwtDecoder/i18n/es.ts +248 -0
  14. package/src/tool/jwtDecoder/i18n/fr.ts +248 -0
  15. package/src/tool/jwtDecoder/i18n/id.ts +248 -0
  16. package/src/tool/jwtDecoder/i18n/it.ts +248 -0
  17. package/src/tool/jwtDecoder/i18n/ja.ts +248 -0
  18. package/src/tool/jwtDecoder/i18n/ko.ts +248 -0
  19. package/src/tool/jwtDecoder/i18n/nl.ts +247 -0
  20. package/src/tool/jwtDecoder/i18n/pl.ts +247 -0
  21. package/src/tool/jwtDecoder/i18n/pt.ts +247 -0
  22. package/src/tool/jwtDecoder/i18n/ru.ts +248 -0
  23. package/src/tool/jwtDecoder/i18n/sv.ts +248 -0
  24. package/src/tool/jwtDecoder/i18n/tr.ts +248 -0
  25. package/src/tool/jwtDecoder/i18n/zh.ts +248 -0
  26. package/src/tool/jwtDecoder/index.ts +11 -0
  27. package/src/tool/jwtDecoder/jwt-decoder-parser-and-claims-inspector.css +358 -0
  28. package/src/tool/jwtDecoder/logic.ts +96 -0
  29. package/src/tool/jwtDecoder/seo.astro +15 -0
  30. package/src/tool/jwtDecoder/ui.ts +38 -0
  31. package/src/tool/serpPixelSimulator/bibliography.astro +11 -4
  32. package/src/tool/serpPixelSimulator/index.ts +0 -4
  33. package/src/tool/serpPixelSimulator/seo.astro +8 -5
  34. package/src/tools.ts +2 -1
@@ -0,0 +1,247 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { JwtDecoderUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
5
+
6
+ const slug = 'jwt-decoder-parser-and-claims-inspector';
7
+ const title = 'JWT Decoder, Parser and Claims Inspector';
8
+ const description = 'Paste a JSON Web Token, decode its header and payload instantly, inspect registered claims, spot expired tokens, and copy clean JSON for debugging authentication flows.';
9
+
10
+ const howTo = [
11
+ {
12
+ name: 'Paste the JWT',
13
+ text: 'Copy a token from an Authorization header, cookie, log entry or identity provider and paste it into the input field.',
14
+ },
15
+ {
16
+ name: 'Read the decoded header and payload',
17
+ text: 'The tool splits the token into header, payload and signature, then renders the JSON segments in separate panels for fast inspection.',
18
+ },
19
+ {
20
+ name: 'Check important claims',
21
+ text: 'Review algorithm, issuer, audience, subject, issued-at time, not-before time and expiration time without manually converting Unix timestamps.',
22
+ },
23
+ {
24
+ name: 'Copy the data you need',
25
+ text: 'Copy one decoded section or the complete decoded output when you need to share a sanitized debugging snapshot with your team.',
26
+ },
27
+ ];
28
+
29
+ const faq = [
30
+ {
31
+ question: 'Does decoding a JWT prove that the token is valid?',
32
+ answer: 'No. Decoding only reveals the base64url-encoded header and payload. A token is trustworthy only after the signature, issuer, audience, expiration and related claims are validated by the application or identity provider.',
33
+ },
34
+ {
35
+ question: 'Can I use this JWT decoder for access tokens and ID tokens?',
36
+ answer: 'Yes. The decoder is useful for inspecting OAuth access tokens, OpenID Connect ID tokens, session tokens and service-to-service tokens, as long as they use the standard three-part JWT format.',
37
+ },
38
+ {
39
+ question: 'Why does the signature panel not verify the token?',
40
+ answer: 'JWT verification requires the correct secret, public key or JWKS configuration. This tool intentionally focuses on decoding and inspection so developers can see token contents without pretending that a visible signature string is proof of validity.',
41
+ },
42
+ {
43
+ question: 'What should I check first when debugging a JWT?',
44
+ answer: 'Start with exp, nbf, iss, aud and alg. Most real production issues come from expired tokens, clock skew, wrong audience values, unexpected issuer URLs or insecure algorithm assumptions.',
45
+ },
46
+ ];
47
+
48
+ const ui: JwtDecoderUI = {
49
+ tokenLabel: 'JWT token',
50
+ tokenPlaceholder: 'Paste a JWT here: header.payload.signature',
51
+ sampleButton: 'Load sample',
52
+ clearButton: 'Clear',
53
+ statusWaiting: 'Paste a token to decode its JSON header, payload and claims.',
54
+ statusValid: 'JWT decoded successfully.',
55
+ statusInvalid: 'This does not look like a valid three-part JWT.',
56
+ statusExpired: 'JWT decoded, but the exp claim is already expired.',
57
+ statusUnsigned: 'JWT decoded, but it is unsigned or uses alg none.',
58
+ headerTitle: 'Header',
59
+ payloadTitle: 'Payload',
60
+ signatureTitle: 'Signature',
61
+ claimsTitle: 'Registered claims',
62
+ copyHeader: 'Copy decoded header',
63
+ copyPayload: 'Copy decoded payload',
64
+ copySignature: 'Copy signature',
65
+ copyAll: 'Copy all',
66
+ copiedLabel: 'Copied',
67
+ invalidTokenTitle: 'Invalid JWT',
68
+ invalidTokenBody: 'Check that the token has three dot-separated base64url segments.',
69
+ invalidSegmentError: 'Check that the token has three dot-separated base64url segments.',
70
+ invalidDecodeError: 'The header or payload could not be decoded as valid JSON.',
71
+ emptyJson: '{}',
72
+ signaturePresent: 'Signature segment is present; verify it in your auth layer with the correct key.',
73
+ signatureMissing: 'No signature segment',
74
+ algorithmLabel: 'Algorithm',
75
+ typeLabel: 'Type',
76
+ issuerLabel: 'Issuer',
77
+ subjectLabel: 'Subject',
78
+ audienceLabel: 'Audience',
79
+ issuedAtLabel: 'Issued at',
80
+ notBeforeLabel: 'Not before',
81
+ expiresAtLabel: 'Expires at',
82
+ claimMissing: 'Not present',
83
+ privacyNote: 'Decoding runs in your browser session. Do not paste production secrets into any tool unless your security policy allows it.',
84
+ sampleToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJnYW1lYm9iLXVzZXItNDIiLCJuYW1lIjoiR2FtZUJvYiBEZXZlbG9wZXIiLCJpc3MiOiJodHRwczovL3d3dy5nYW1lYm9iLmRldiIsImF1ZCI6ImRldmVsb3Blci10b29scyIsImlhdCI6MTcxNzIwMDAwMCwibmJmIjoxNzE3MjAwMDAwLCJleHAiOjE4OTM0NTYwMDAsInJvbGUiOiJhZG1pbiJ9.demo-signature',
85
+ };
86
+
87
+ const faqSchema: WithContext<FAQPage> = {
88
+ '@context': 'https://schema.org',
89
+ '@type': 'FAQPage',
90
+ mainEntity: faq.map((item) => ({
91
+ '@type': 'Question',
92
+ name: item.question,
93
+ acceptedAnswer: {
94
+ '@type': 'Answer',
95
+ text: item.answer,
96
+ },
97
+ })),
98
+ };
99
+
100
+ const howToSchema: WithContext<HowTo> = {
101
+ '@context': 'https://schema.org',
102
+ '@type': 'HowTo',
103
+ name: title,
104
+ description,
105
+ step: howTo.map((step, index) => ({
106
+ '@type': 'HowToStep',
107
+ position: index + 1,
108
+ name: step.name,
109
+ text: step.text,
110
+ })),
111
+ };
112
+
113
+ const appSchema: WithContext<SoftwareApplication> = {
114
+ '@context': 'https://schema.org',
115
+ '@type': 'SoftwareApplication',
116
+ name: title,
117
+ description,
118
+ applicationCategory: 'DeveloperApplication',
119
+ operatingSystem: 'Any',
120
+ offers: {
121
+ '@type': 'Offer',
122
+ price: '0',
123
+ priceCurrency: 'EUR',
124
+ },
125
+ };
126
+
127
+ export const content: ToolLocaleContent<JwtDecoderUI> = {
128
+ slug,
129
+ title,
130
+ description,
131
+ ui,
132
+ faqTitle: 'JWT decoder FAQ',
133
+ faq,
134
+ bibliographyTitle: 'JWT specifications and security references',
135
+ bibliography,
136
+ howTo,
137
+ schemas: [appSchema, faqSchema, howToSchema],
138
+ seo: [
139
+ {
140
+ type: 'title',
141
+ text: 'Decode JWTs without losing the security context',
142
+ level: 2,
143
+ },
144
+ {
145
+ type: 'paragraph',
146
+ html: 'A JSON Web Token looks compact, but it often carries the exact detail that explains an authentication failure: the signing algorithm, issuer, audience, subject, issued-at time, not-before time, expiration and application-specific authorization claims. This <strong>JWT decoder, parser and claims inspector</strong> turns the three token segments into readable JSON so you can debug auth flows faster.',
147
+ },
148
+ {
149
+ type: 'diagnostic',
150
+ variant: 'warning',
151
+ title: 'Decoded does not mean trusted',
152
+ html: 'Anyone can base64url-decode a JWT. Trust begins only after your application verifies the signature with the correct secret, public key or JWKS, then validates issuer, audience, expiration and any domain-specific claims. Use this tool to inspect data, not to accept a token as authentic.',
153
+ },
154
+ {
155
+ type: 'title',
156
+ text: 'What each JWT segment tells you',
157
+ level: 3,
158
+ },
159
+ {
160
+ type: 'table',
161
+ headers: ['Segment', 'Typical content', 'Debugging value'],
162
+ rows: [
163
+ ['Header', 'Algorithm, token type and optional key id', 'Shows whether the token expects HS256, RS256, ES256 or another verification strategy.'],
164
+ ['Payload', 'Registered claims and application claims', 'Reveals identity, tenant, scopes, roles, expiration and audience mismatches.'],
165
+ ['Signature', 'Cryptographic signature bytes encoded as base64url', 'Confirms that a signature segment exists, but must be verified with the right key elsewhere.'],
166
+ ],
167
+ },
168
+ {
169
+ type: 'title',
170
+ text: 'Claims that usually explain broken authentication',
171
+ level: 3,
172
+ },
173
+ {
174
+ type: 'list',
175
+ items: [
176
+ '<strong>exp:</strong> if the token expired, refresh logic or clock settings may be wrong.',
177
+ '<strong>nbf:</strong> if the token is not active yet, server and identity provider clocks may be out of sync.',
178
+ '<strong>iss:</strong> if the issuer URL differs from configuration, the token may come from the wrong tenant or environment.',
179
+ '<strong>aud:</strong> if the audience does not match the API identifier, the token was minted for another resource.',
180
+ '<strong>alg:</strong> if the algorithm is unexpected, your verifier may reject the token or expose a dangerous configuration mistake.',
181
+ ],
182
+ },
183
+ {
184
+ type: 'title',
185
+ text: 'Use cases for a JWT parser during development',
186
+ level: 3,
187
+ },
188
+ {
189
+ type: 'comparative',
190
+ columns: 3,
191
+ items: [
192
+ {
193
+ title: 'Frontend debugging',
194
+ description: 'Inspect ID tokens and access tokens received after login to confirm scopes, roles and profile claims.',
195
+ icon: 'mdi:monitor-dashboard',
196
+ points: ['Check profile claims', 'Confirm scopes and roles', 'Compare login environments'],
197
+ },
198
+ {
199
+ title: 'Backend API QA',
200
+ description: 'Compare expected issuer and audience values with the token actually sent in an Authorization header.',
201
+ icon: 'mdi:api',
202
+ highlight: true,
203
+ points: ['Validate audience shape', 'Spot issuer mismatches', 'Inspect bearer tokens'],
204
+ },
205
+ {
206
+ title: 'Identity provider setup',
207
+ description: 'Check whether claims from Auth0, Azure AD, Cognito, Keycloak or a custom provider are shaped as your app expects.',
208
+ icon: 'mdi:account-key',
209
+ points: ['Review tenant data', 'Check custom claims', 'Compare provider mappings'],
210
+ },
211
+ ],
212
+ },
213
+ {
214
+ type: 'title',
215
+ text: 'Common JWT mistakes this inspector makes obvious',
216
+ level: 3,
217
+ },
218
+ {
219
+ type: 'proscons',
220
+ title: 'Fast checks versus trust decisions',
221
+ items: [
222
+ {
223
+ pro: 'See malformed tokens immediately.',
224
+ con: 'It cannot know your expected audience or issuer.',
225
+ },
226
+ {
227
+ pro: 'Convert Unix timestamp claims into readable dates.',
228
+ con: 'It cannot verify a signature without the real key material.',
229
+ },
230
+ {
231
+ pro: 'Spot missing issuer, audience, subject or type values.',
232
+ con: 'It cannot prove that scopes and roles are safe for your application.',
233
+ },
234
+ ],
235
+ },
236
+ {
237
+ type: 'summary',
238
+ title: 'Best practice workflow',
239
+ items: [
240
+ 'Decode the token to understand what the client or API actually received.',
241
+ 'Check exp, nbf, iss, aud, sub and alg before chasing application logic.',
242
+ 'Verify signatures and trust decisions only in your auth layer.',
243
+ 'Avoid sharing sensitive production JWTs in tickets, logs or screenshots.',
244
+ ],
245
+ },
246
+ ],
247
+ };
@@ -0,0 +1,248 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { JwtDecoderUI } from '../ui';
4
+ import { bibliography } from '../bibliography';
5
+
6
+ const slug = 'decodificador-jwt-parser-e-inspector-de-claims';
7
+ const title = 'Decodificador JWT, Parser e Inspector de Claims';
8
+ const description = 'Pega un JSON Web Token, decodifica su cabecera y payload al instante, inspecciona claims registrados, detecta tokens expirados y copia JSON limpio para depurar flujos de autenticación.';
9
+
10
+ const howTo = [
11
+ {
12
+ name: 'Pega el JWT',
13
+ text: 'Copia un token de una cabecera Authorization, cookie, entrada de log o proveedor de identidad y pégalo en el campo de entrada.',
14
+ },
15
+ {
16
+ name: 'Lee la cabecera y el payload decodificados',
17
+ text: 'La herramienta divide el token en cabecera, payload y firma, luego muestra los segmentos JSON en paneles separados para una inspección rápida.',
18
+ },
19
+ {
20
+ name: 'Comprueba los claims importantes',
21
+ text: 'Revisa el algoritmo, emisor, audiencia, sujeto, fecha de emisión, fecha de validez inicial y fecha de expiración sin convertir manualmente timestamps Unix.',
22
+ },
23
+ {
24
+ name: 'Copia los datos que necesitas',
25
+ text: 'Copia una sección decodificada o la salida decodificada completa cuando necesites compartir una instantánea de depuración saneada con tu equipo.',
26
+ },
27
+ ];
28
+
29
+ const faq = [
30
+ {
31
+ question: '¿Decodificar un JWT demuestra que el token es válido?',
32
+ answer: 'No. Decodificar solo revela la cabecera y el payload codificados en base64url. Un token es confiable solo después de que la firma, el emisor, la audiencia, la expiración y los claims relacionados sean validados por la aplicación o el proveedor de identidad.',
33
+ },
34
+ {
35
+ question: '¿Puedo usar este decodificador JWT para access tokens e ID tokens?',
36
+ answer: 'Sí. El decodificador es útil para inspeccionar access tokens OAuth, ID tokens OpenID Connect, tokens de sesión y tokens servicio a servicio, siempre que usen el formato JWT estándar de tres partes.',
37
+ },
38
+ {
39
+ question: '¿Por qué el panel de firma no verifica el token?',
40
+ answer: 'La verificación JWT requiere el secreto correcto, la clave pública o la configuración JWKS. Esta herramienta se centra intencionadamente en la decodificación e inspección para que los desarrolladores puedan ver el contenido del token sin pretender que una cadena de firma visible es prueba de validez.',
41
+ },
42
+ {
43
+ question: '¿Qué debo comprobar primero al depurar un JWT?',
44
+ answer: 'Empieza por exp, nbf, iss, aud y alg. La mayoría de los problemas reales en producción provienen de tokens expirados, desfase de reloj, valores de audiencia incorrectos, URLs de emisor inesperadas o suposiciones inseguras sobre el algoritmo.',
45
+ },
46
+ ];
47
+
48
+ const ui: JwtDecoderUI = {
49
+ tokenLabel: 'Token JWT',
50
+ tokenPlaceholder: 'Pega un JWT aquí: cabecera.payload.firma',
51
+ sampleButton: 'Cargar ejemplo',
52
+ clearButton: 'Limpiar',
53
+ statusWaiting: 'Pega un token para decodificar su cabecera JSON, payload y claims.',
54
+ statusValid: 'JWT decodificado correctamente.',
55
+ statusInvalid: 'Esto no parece un JWT válido de tres partes.',
56
+ statusExpired: 'JWT decodificado, pero el claim exp ya está expirado.',
57
+ statusUnsigned: 'JWT decodificado, pero no está firmado o usa el algoritmo none.',
58
+ headerTitle: 'Cabecera',
59
+ payloadTitle: 'Payload',
60
+ signatureTitle: 'Firma',
61
+ claimsTitle: 'Claims registrados',
62
+ copyHeader: 'Copiar cabecera decodificada',
63
+ copyPayload: 'Copiar payload decodificado',
64
+ copySignature: 'Copiar firma',
65
+ copyAll: 'Copiar todo',
66
+ copiedLabel: 'Copiado',
67
+ invalidTokenTitle: 'JWT no válido',
68
+ invalidTokenBody: 'Comprueba que el token tiene tres segmentos base64url separados por puntos.',
69
+ invalidSegmentError: 'Comprueba que el token tiene tres segmentos base64url separados por puntos.',
70
+ invalidDecodeError: 'La cabecera o el payload no se pudieron decodificar como JSON válido.',
71
+ emptyJson: '{}',
72
+ signaturePresent: 'El segmento de firma está presente; verifícalo en tu capa de autenticación con la clave correcta.',
73
+ signatureMissing: 'Sin segmento de firma',
74
+ algorithmLabel: 'Algoritmo',
75
+ typeLabel: 'Tipo',
76
+ issuerLabel: 'Emisor',
77
+ subjectLabel: 'Sujeto',
78
+ audienceLabel: 'Audiencia',
79
+ issuedAtLabel: 'Emitido el',
80
+ notBeforeLabel: 'No antes del',
81
+ expiresAtLabel: 'Expira el',
82
+ claimMissing: 'No presente',
83
+ privacyNote: 'La decodificación se ejecuta en tu navegador. No pegues secretos de producción en ninguna herramienta a menos que tu política de seguridad lo permita.',
84
+ sampleToken: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJnYW1lYm9iLXVzZXItNDIiLCJuYW1lIjoiR2FtZUJvYiBEZXZlbG9wZXIiLCJpc3MiOiJodHRwczovL3d3dy5nYW1lYm9iLmRldiIsImF1ZCI6ImRldmVsb3Blci10b29scyIsImlhdCI6MTcxNzIwMDAwMCwibmJmIjoxNzE3MjAwMDAwLCJleHAiOjE4OTM0NTYwMDAsInJvbGUiOiJhZG1pbiJ9.demo-signature',
85
+ };
86
+
87
+ const faqSchema: WithContext<FAQPage> = {
88
+ '@context': 'https://schema.org',
89
+ '@type': 'FAQPage',
90
+ mainEntity: faq.map((item) => ({
91
+ '@type': 'Question',
92
+ name: item.question,
93
+ acceptedAnswer: {
94
+ '@type': 'Answer',
95
+ text: item.answer,
96
+ },
97
+ })),
98
+ };
99
+
100
+ const howToSchema: WithContext<HowTo> = {
101
+ '@context': 'https://schema.org',
102
+ '@type': 'HowTo',
103
+ name: title,
104
+ description,
105
+ step: howTo.map((step, index) => ({
106
+ '@type': 'HowToStep',
107
+ position: index + 1,
108
+ name: step.name,
109
+ text: step.text,
110
+ })),
111
+ };
112
+
113
+ const appSchema: WithContext<SoftwareApplication> = {
114
+ '@context': 'https://schema.org',
115
+ '@type': 'SoftwareApplication',
116
+ name: title,
117
+ description,
118
+ applicationCategory: 'DeveloperApplication',
119
+ operatingSystem: 'Any',
120
+ offers: {
121
+ '@type': 'Offer',
122
+ price: '0',
123
+ priceCurrency: 'EUR',
124
+ },
125
+ inLanguage: 'es',
126
+ };
127
+
128
+ export const content: ToolLocaleContent<JwtDecoderUI> = {
129
+ slug,
130
+ title,
131
+ description,
132
+ ui,
133
+ faqTitle: 'Preguntas frecuentes sobre el decodificador JWT',
134
+ faq,
135
+ bibliographyTitle: 'Especificaciones JWT y referencias de seguridad',
136
+ bibliography,
137
+ howTo,
138
+ schemas: [appSchema, faqSchema, howToSchema],
139
+ seo: [
140
+ {
141
+ type: 'title',
142
+ text: 'Decodifica JWTs sin perder el contexto de seguridad',
143
+ level: 2,
144
+ },
145
+ {
146
+ type: 'paragraph',
147
+ html: 'Un JSON Web Token parece compacto, pero a menudo contiene el detalle exacto que explica un fallo de autenticación: el algoritmo de firma, emisor, audiencia, sujeto, fecha de emisión, fecha de validez inicial, expiración y claims de autorización específicos de la aplicación. Este <strong>decodificador JWT, parser e inspector de claims</strong> convierte los tres segmentos del token en JSON legible para que puedas depurar flujos de autenticación más rápido.',
148
+ },
149
+ {
150
+ type: 'diagnostic',
151
+ variant: 'warning',
152
+ title: 'Decodificado no significa confiable',
153
+ html: 'Cualquiera puede decodificar un JWT en base64url. La confianza comienza solo después de que tu aplicación verifique la firma con el secreto, clave pública o JWKS correctos y luego valide el emisor, la audiencia, la expiración y cualquier claim específico del dominio. Usa esta herramienta para inspeccionar datos, no para aceptar un token como auténtico.',
154
+ },
155
+ {
156
+ type: 'title',
157
+ text: 'Lo que te dice cada segmento JWT',
158
+ level: 3,
159
+ },
160
+ {
161
+ type: 'table',
162
+ headers: ['Segmento', 'Contenido típico', 'Valor de depuración'],
163
+ rows: [
164
+ ['Cabecera', 'Algoritmo, tipo de token e ID de clave opcional', 'Muestra si el token espera HS256, RS256, ES256 u otra estrategia de verificación.'],
165
+ ['Payload', 'Claims registrados y claims de aplicación', 'Revela identidad, tenant, scopes, roles, expiración y desajustes de audiencia.'],
166
+ ['Firma', 'Bytes de firma criptográfica codificados como base64url', 'Confirma que existe un segmento de firma, pero debe verificarse con la clave correcta en otro lugar.'],
167
+ ],
168
+ },
169
+ {
170
+ type: 'title',
171
+ text: 'Claims que suelen explicar fallos de autenticación',
172
+ level: 3,
173
+ },
174
+ {
175
+ type: 'list',
176
+ items: [
177
+ '<strong>exp:</strong> si el token expiró, la lógica de renovación o la configuración del reloj pueden estar mal.',
178
+ '<strong>nbf:</strong> si el token aún no está activo, los relojes del servidor y del proveedor de identidad pueden estar desincronizados.',
179
+ '<strong>iss:</strong> si la URL del emisor difiere de la configuración, el token puede venir del tenant o entorno equivocado.',
180
+ '<strong>aud:</strong> si la audiencia no coincide con el identificador de la API, el token fue emitido para otro recurso.',
181
+ '<strong>alg:</strong> si el algoritmo es inesperado, tu verificador puede rechazar el token o exponer un error de configuración peligroso.',
182
+ ],
183
+ },
184
+ {
185
+ type: 'title',
186
+ text: 'Casos de uso de un parser JWT durante el desarrollo',
187
+ level: 3,
188
+ },
189
+ {
190
+ type: 'comparative',
191
+ columns: 3,
192
+ items: [
193
+ {
194
+ title: 'Depuración frontend',
195
+ description: 'Inspecciona ID tokens y access tokens recibidos tras el inicio de sesión para confirmar scopes, roles y claims de perfil.',
196
+ icon: 'mdi:monitor-dashboard',
197
+ points: ['Comprueba claims de perfil', 'Confirma scopes y roles', 'Compara entornos de login'],
198
+ },
199
+ {
200
+ title: 'QA de API backend',
201
+ description: 'Compara los valores esperados de emisor y audiencia con el token realmente enviado en una cabecera Authorization.',
202
+ icon: 'mdi:api',
203
+ highlight: true,
204
+ points: ['Valida la forma de la audiencia', 'Detecta desajustes de emisor', 'Inspecciona bearer tokens'],
205
+ },
206
+ {
207
+ title: 'Configuración del proveedor de identidad',
208
+ description: 'Comprueba si los claims de Auth0, Azure AD, Cognito, Keycloak o un proveedor personalizado tienen la forma que tu aplicación espera.',
209
+ icon: 'mdi:account-key',
210
+ points: ['Revisa datos del tenant', 'Comprueba claims personalizados', 'Compara mapeos del proveedor'],
211
+ },
212
+ ],
213
+ },
214
+ {
215
+ type: 'title',
216
+ text: 'Errores comunes de JWT que este inspector hace evidentes',
217
+ level: 3,
218
+ },
219
+ {
220
+ type: 'proscons',
221
+ title: 'Comprobaciones rápidas frente a decisiones de confianza',
222
+ items: [
223
+ {
224
+ pro: 'Ve tokens mal formados inmediatamente.',
225
+ con: 'No puede conocer tu audiencia o emisor esperados.',
226
+ },
227
+ {
228
+ pro: 'Convierte claims de timestamp Unix en fechas legibles.',
229
+ con: 'No puede verificar una firma sin el material de clave real.',
230
+ },
231
+ {
232
+ pro: 'Detecta valores faltantes de emisor, audiencia, sujeto o tipo.',
233
+ con: 'No puede demostrar que los scopes y roles son seguros para tu aplicación.',
234
+ },
235
+ ],
236
+ },
237
+ {
238
+ type: 'summary',
239
+ title: 'Flujo de trabajo recomendado',
240
+ items: [
241
+ 'Decodifica el token para entender lo que el cliente o la API realmente recibieron.',
242
+ 'Comprueba exp, nbf, iss, aud, sub y alg antes de perseguir la lógica de aplicación.',
243
+ 'Verifica firmas y decisiones de confianza solo en tu capa de autenticación.',
244
+ 'Evita compartir JWTs de producción sensibles en tickets, logs o capturas de pantalla.',
245
+ ],
246
+ },
247
+ ],
248
+ };