Enum kvarn_auth::Validation
source · 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.
Trait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Validation<T>where
T: RefUnwindSafe,
impl<T> Send for Validation<T>where
T: Send,
impl<T> Sync for Validation<T>where
T: Sync,
impl<T> Unpin for Validation<T>where
T: Unpin,
impl<T> UnwindSafe for Validation<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more