[−][src]Crate jsonwebtoken
Create and parses JWT (JSON Web Tokens)
Documentation: stable
Modules
| errors | All the errors, generated using error-chain |
Structs
| Header | A basic JWT header, the alg defaults to HS256 and typ is automatically
set to |
| TokenData | The return type of a successful call to decode |
| Validation | Contains the various validations that are applied after decoding a token. |
Enums
| Algorithm | The algorithms supported for signing/verifying |
Functions
| dangerous_unsafe_decode | Decode a token without any signature validation into a struct containing 2 fields: |
| decode | Decode a token into a struct containing 2 fields: |
| decode_header | Decode a token and return the Header. This is not doing any kind of validation: it is meant to be
used when you don't know which |
| encode | Encode the header and claims given and sign the payload using the algorithm from the header and the key |
| sign | Take the payload of a JWT, sign it using the algorithm given and return the base64 url safe encoded of the result. |
| verify | Compares the signature given with a re-computed signature for HMAC or using the public key for RSA. |