Gist d8122161cee20af6219aa00b744ec60e
✓ Published0🌍 Public
CCarlos-Augusto
Last edited Oct 12, 2020
Created on Oct 9, 2020
This example decodes a JSON Web Token (JWT) in Scala, showing the three components of the token: header, payload, and signature. It uses the `pdi.jwt` library to encode a claim with a secret key and the HS256 algorithm, then decodes it back with `Jwt.decodeRawAll`. The payload contains issuer, audience, expiration, and a custom role claim, serialized via `org.json4s`.
AI-generated description