validation-error
Validation error types.
variant validation-error {
invalid-token,
invalid-signature,
invalid-ecdsa-key,
invalid-rsa-key,
rsa-failed-signing,
invalid-algorithm-name,
invalid-key-format,
missing-required-claim,
expired-signature,
invalid-issuer,
invalid-audience,
invalid-subject,
immature-signature,
invalid-algorithm,
missing-algorithm,
base64,
json,
utf8,
crypto,
other(string),
}Cases
| Case | Payload | Description |
|---|---|---|
| invalid-token | — | When a token doesn't have a valid JWT shape |
| invalid-signature | — | When the signature doesn't match |
| invalid-ecdsa-key | — | When the secret given is not a valid ECDSA key |
| invalid-rsa-key | — | When the secret given is not a valid RSA key |
| rsa-failed-signing | — | We could not sign with the given key |
| invalid-algorithm-name | — | When the algorithm from string doesn't match the one passed to |
| invalid-key-format | — | When a key is provided with an invalid format |
| missing-required-claim | — | Validation errors When a claim required by the validation is not present |
| expired-signature | — | When a token’s |
| invalid-issuer | — | When a token’s |
| invalid-audience | — | When a token’s |
| invalid-subject | — | When a token’s |
| immature-signature | — | When a token’s |
| invalid-algorithm | — | When the algorithm in the header doesn't match the one passed to |
| missing-algorithm | — | When the Validation struct does not contain at least 1 algorithm |
| base64 | — | 3rd party errors An error happened when decoding some base64 text |
| json | — | An error happened while serializing/deserializing JSON |
| utf8 | — | Some of the text was invalid UTF-8 |
| crypto | — | Something unspecified went wrong with crypto |
| other | string | Something unspecified went wrong |