jwt
JWT¶
JWT is used for creating and verifying JSON Web Tokens.
It is commonly used for:
- Authentication
- Session management
- Secure data transfer between systems
JWT functionality is available through the modules object.
Creating a Token¶
This generates a signed token string.
Verifying a Token¶
This verifies the token and returns the decoded payload.
Example Output¶
Notes¶
- Tokens are cryptographically signed
- Use strong secrets or keys
- Verification fails if the token is invalid or expired