Struct representing a JWT, including its Headers and claims. The claims type (C) can be
customized. If features jwt-ietf or jwt-openid are enabled, the type will default to
the claims for the respective feature. If both features are enabled, the type will default
to the claims from jwt-ietf. If neither feature is enabled (but jwt is enabled), then
the default will simply be a serde_json::Value. In all cases, the type can be overridden
by the consumer.
Included in JwtCsrf to indicate whether it’s safe to use the JWT or if the consuming
application should apply a CSRF protection mechanism before performing any destructive actions
for the subject represented by the JWT.
The subject of a JWT claim. Technically the IETF spec only specifies that this is a StringOrURI
type, and the OpenID spec specifies String. However, since this is likely to contain a user ID,
we will also try to deserialize directly into a UUID or Integer. Deserialization will fall back
to a simple String if the value can not be parsed into a UUID or Integer (or URI).
See: https://www.rfc-editor.org/rfc/rfc7519.html#section-4.1.2
See: https://openid.net/specs/openid-connect-core-1_0.html#IDToken