pub struct ValidationContext {
pub allow_list: HashMap<String, HashSet<String>>,
pub deny_list: HashMap<String, HashSet<String>>,
pub claims: HashMap<String, ValidationType>,
pub expiry: ValidationType,
pub not_before: ValidationType,
}Fields§
§allow_list: HashMap<String, HashSet<String>>§deny_list: HashMap<String, HashSet<String>>§claims: HashMap<String, ValidationType>§expiry: ValidationType§not_before: ValidationTypeImplementations§
Source§impl ValidationContext
impl ValidationContext
pub fn require_claim_with_allow_list(&mut self, claim: &str, values: &[&str])
pub fn require_claim_with_deny_list(&mut self, claim: &str, values: &[&str])
pub fn require_claim(&mut self, claim: &str)
pub fn reject_claim(&mut self, claim: &str)
pub fn ignore_claim(&mut self, claim: &str)
pub fn allow_claim(&mut self, claim: &str)
Trait Implementations§
Source§impl Clone for ValidationContext
impl Clone for ValidationContext
Source§fn clone(&self) -> ValidationContext
fn clone(&self) -> ValidationContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ValidationContext
impl Default for ValidationContext
Source§fn default() -> ValidationContext
fn default() -> ValidationContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ValidationContext
impl<'de> Deserialize<'de> for ValidationContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ValidationContext
impl RefUnwindSafe for ValidationContext
impl Send for ValidationContext
impl Sync for ValidationContext
impl Unpin for ValidationContext
impl UnwindSafe for ValidationContext
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