pub struct AuthOptions<'a> { /* private fields */ }
Expand description
Authentication options
Only the API key is mandatory.
By default a uuid is not validated, the random split characters are %.,
and max age or tolerance is 5 minutes (or 300000 milliseconds)
NB: The random split characters (rand_char_str) may not include alphanumeric characters or underscores, as these would break other validation
Implementations§
Source§impl<'a> AuthOptions<'a>
impl<'a> AuthOptions<'a>
pub fn new(api_key: &'a str) -> Self
pub fn set_rand_char_str(&mut self, char_str: &'a str) -> Self
Sourcepub fn rand_chars(&self) -> Vec<char>
pub fn rand_chars(&self) -> Vec<char>
Return the random split characters as an array
Sourcepub fn should_check_uuid(&self) -> bool
pub fn should_check_uuid(&self) -> bool
Only validate embedded UUIDs if this flag is true
Sourcepub fn check_uuid(&mut self, val: bool) -> Self
pub fn check_uuid(&mut self, val: bool) -> Self
Set check UUID status. True means it must be present in a valid hexadecimal format once decoded
Sourcepub fn set_tolerance(&mut self, millis: u32) -> Self
pub fn set_tolerance(&mut self, millis: u32) -> Self
Set timestamp tolerance in milliseconds
Sourcepub fn set_tolerance_secs(&mut self, secs: u32) -> Self
pub fn set_tolerance_secs(&mut self, secs: u32) -> Self
Set timestamp tolerance in seconds
Sourcepub fn set_tolerance_mins(&mut self, mins: u32) -> Self
pub fn set_tolerance_mins(&mut self, mins: u32) -> Self
Set timestamp tolerance in minutes
Trait Implementations§
Source§impl<'a> Clone for AuthOptions<'a>
impl<'a> Clone for AuthOptions<'a>
Source§fn clone(&self) -> AuthOptions<'a>
fn clone(&self) -> AuthOptions<'a>
Returns a copy 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<'a> Debug for AuthOptions<'a>
impl<'a> Debug for AuthOptions<'a>
impl<'a> Copy for AuthOptions<'a>
Auto Trait Implementations§
impl<'a> Freeze for AuthOptions<'a>
impl<'a> RefUnwindSafe for AuthOptions<'a>
impl<'a> Send for AuthOptions<'a>
impl<'a> Sync for AuthOptions<'a>
impl<'a> Unpin for AuthOptions<'a>
impl<'a> UnwindSafe for AuthOptions<'a>
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