pub struct MultiTeamValidator { /* private fields */ }Expand description
Represents a Validator implementation capable of validating tokens associated with many CFZT teams.
Implementations§
Source§impl MultiTeamValidator
impl MultiTeamValidator
Sourcepub fn add_team(&mut self, team_validator: TeamValidator) -> StdResult<()>
pub fn add_team(&mut self, team_validator: TeamValidator) -> StdResult<()>
Adds a single TeamValidator into the MultiTeamValidator TeamCache.
Sourcepub fn sync_team(&self, team_name: &str) -> StdResult<bool>
pub fn sync_team(&self, team_name: &str) -> StdResult<bool>
Attempts to syncronise a team added to the MultiTeamValidator with those available via the CF API. Returns a wrapped bool signalling if an update was necessary.
pub fn get_team_names(&self) -> Vec<String>
Trait Implementations§
Source§impl Default for MultiTeamValidator
impl Default for MultiTeamValidator
Source§impl Validator for MultiTeamValidator
impl Validator for MultiTeamValidator
Source§fn validate_token(
&self,
token: &str,
team_name: &str,
constraints: &mut Validation,
) -> Result<DecodedToken, ValidationError>
fn validate_token( &self, token: &str, team_name: &str, constraints: &mut Validation, ) -> Result<DecodedToken, ValidationError>
Attempts to validate a token against a CFZT Team associated with the MultiTeamValidator.
fn sync(&self) -> StdResult<bool>
Auto Trait Implementations§
impl Freeze for MultiTeamValidator
impl !RefUnwindSafe for MultiTeamValidator
impl Send for MultiTeamValidator
impl Sync for MultiTeamValidator
impl Unpin for MultiTeamValidator
impl !UnwindSafe for MultiTeamValidator
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