pub enum Validation<T: Serialize + DeserializeOwned> {
Unauthorized,
Authorized(AuthData<T>),
}
Expand description
The state of the user in question.
Variants§
This can come from multiple sources, including but not limited to:
- invalid base64 encoding
- invalid JWT structure
- mismatched hash (the user changed their privilege)
- serialization errors to the desired structured type
- unexpected data in the JSON
- failed to parse JSON
- expiry date is not included
Authorized(AuthData<T>)
The user is authorized with the provided data. The data is guaranteed to be what you authorized.