Function min_jwt::serialize_encode_and_sign
source · pub fn serialize_encode_and_sign<H, C, S>(
header: &H,
claims: &C,
signing_key: S
) -> Result<String>
Available on crate features
serde
and serde_json
only.Expand description
Serializes the types to JSON, base64 encodes the JSON, constructs the signing input, signs the data, and then returns the JWT.
Errors
The function may return an error variant because the key pair is invalid.