Struct unleash_edge::auth::token_validator::TokenValidator
source · pub struct TokenValidator {
pub unleash_client: Arc<UnleashClient>,
pub token_cache: Arc<DashMap<String, EdgeToken>>,
pub persistence: Option<Arc<dyn EdgePersistence>>,
}
Fields§
§unleash_client: Arc<UnleashClient>
§token_cache: Arc<DashMap<String, EdgeToken>>
§persistence: Option<Arc<dyn EdgePersistence>>
Implementations§
source§impl TokenValidator
impl TokenValidator
pub async fn register_token(&self, token: String) -> EdgeResult<EdgeToken>
pub async fn register_tokens( &self, tokens: Vec<String> ) -> EdgeResult<Vec<EdgeToken>>
pub async fn schedule_validation_of_known_tokens( &self, validation_interval_seconds: u64 )
pub async fn schedule_revalidation_of_startup_tokens( &self, tokens: Vec<String>, refresher: Option<Arc<FeatureRefresher>> )
pub async fn revalidate_known_tokens(&self) -> EdgeResult<()>
Trait Implementations§
source§impl Clone for TokenValidator
impl Clone for TokenValidator
source§fn clone(&self) -> TokenValidator
fn clone(&self) -> TokenValidator
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 moreAuto Trait Implementations§
impl Freeze for TokenValidator
impl !RefUnwindSafe for TokenValidator
impl Send for TokenValidator
impl Sync for TokenValidator
impl Unpin for TokenValidator
impl !UnwindSafe for TokenValidator
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