Crate jsonwebtoken [−] [src]
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 |
Validation |
Contains the various validations that are applied after decoding a token. |
Enums
Algorithm |
The algorithms supported for signing/verifying |
Functions
decode |
Decode a token into a struct containing 2 fields: |
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. |