Structs§
Enums§
- Algorithm
- The algorithm used to sign the JWT. Currently, only HS256 is supported.
- Decode
Claims Error - Type returned when decoding claims fails
- Decode
Header Error - Error type returned when decoding a header fails
- Encode
Claims Error - Error type returned when encoding claims fails.
- Encode
Header Error - Error type returned when encoding a header fails
- Sign
Token Error - The error type for signing operations
- Verify
Token Error - Type returned if there is an error when verifying a token
Functions§
- decode_
claims - Decodes claims from a base64 string into the user defined type T
- decode_
header - Decodes a base64 string into a header
- encode_
claims - Encodes claims into a base64 string.
- encode_
header - Encodes a header into a base64 string
- sign
- Signs the token with the given header and claims using the specified signing key.
- verify
- Verify a token using the given algorithm and (public/verifying) key