pub fn sign<ExtraClaims: Serialize>(
claims: &mut HeaderAndClaims<ExtraClaims>,
k: &dyn SigningKey
) -> Result<String>
Expand description
Encode and sign this header and claims with the signing key.
The alg
field in header is automatically set. The kid
claim is
automatically set if the key has an id.
Returns a signed JWT.