🎫 Decoder tal-JWT

Iddekodifika JSON Web Tokens (JWT) biex tara r-ras (header), it-tagħbija (payload) u l-firma (signature).

X'inhu JSON Web Token (JWT)?

JWT huwa metodu kumpatt u bla periklu (safe) fil-URL biex jiġi trażmess it-tagħrif (stqarrijiet) bejn żewġ partijiet bħala oġġett JSON.

Struttura tal-JWT

  • Ras: Jiddefinixxi l-algoritmu tal-kriptaġġ. Contains the signing algorithm (e.g., HS256, RS256) and token type.
  • Tagħbija: Għaqda ta' dettalji tal-identità (autentikazzjoni). Contains claims — statements about the user and additional metadata.
  • Firma: Assikurazzjoni tal-integrità tal-fajl. Verifies the token hasn't been tampered with. Created using the header, payload, and a secret key.

Mistoqsijiet Komuni

Jekk npoġġi t-token privat tiegħi hawn ninsab sigur?

Iva! Il-pjattaforma ssemmi l-kodiċi tal-JavaScript direttament fil-browser tiegħek lokalment mingħajr l-ebda konnessjoni mal-backends.

L-espressjoni 'exp' xi tfisser fil-JWT?

Id-dikjarazzjoni 'exp' hija ż-żmien maħdum fis-sistema tal-UNIX (f'sekondi) li jiddeskrivi meta t-token jispiċċa l-validità tiegħu.

Decodes JSON Web Tokens showing header, payload, and signature without requiring the secret key, for debugging auth flows.

Key Facts

  • Standardized in RFC 7519 (2015)
  • 80%+ of modern APIs use JWT
  • Three parts separated by dots (.)
  • Common algorithms: HS256, RS256

Frequently Asked Questions

What is a JWT?

Compact, URL-safe token with header (algorithm), payload (claims), and signature for API authentication.

Is decoding JWT safe?

Yes — payload is base64-encoded, not encrypted. Security is in signature verification, not content hiding.

What are JWT claims?

Statements about user: iss (issuer), sub (subject), exp (expiration), iat (issued at), aud (audience).

How long should JWT last?

Access tokens: 15-30 min. Refresh tokens: 7-30 days. Short-lived limits damage if compromised.