Crate axum_jwt_ware

Source

Structs§

AuthError
Claims
CurrentUser
DecodingContext
DecodingKey
All the different kind of keys we can use to decode a JWT. This key can be re-used so make sure you only initialize it once if you can for better performance.
EncodingContext
EncodingKey
A key to encode a JWT with. Can be a secret, a PEM-encoded key or a DER-encoded key. This key can be re-used so make sure you only initialize it once if you can for better performance.
Error
An error that can occur when encoding/decoding JWTs
Header
A basic JWT header, the alg defaults to HS256 and typ is automatically set to JWT. All the other fields are optional.
LoginResponse
RefreshBody
RequestBody
Validation
Contains the various validations that are applied after decoding a JWT.

Enums§

Algorithm
The algorithms supported for signing/verifying JWTs

Traits§

Deserialize
A data structure that can be deserialized from any data format supported by Serde.
Serialize
A data structure that can be serialized into any data format supported by Serde.
UserData

Functions§

auth_token_decode
auth_token_encode
decode
Decode and validate a JWT
encode
Encode the header and claims given and sign the payload using the algorithm from the header and the key. If the algorithm given is RSA or EC, the key needs to be in the PEM format.
login
refresh_token
verify_user

Derive Macros§

Deserialize
Serialize