pub struct CpskValidator { /* private fields */ }Expand description
Capability Pre-Shared Key (CPSK) validator
Stores tokens in memory with their associated scopes.
Tokens have the format: cpsk_<base62-random-32-chars>
Implementations§
Source§impl CpskValidator
impl CpskValidator
Sourcepub fn list_tokens(&self) -> Vec<String>
pub fn list_tokens(&self) -> Vec<String>
List all token IDs (for admin purposes)
Sourcepub fn generate_token() -> String
pub fn generate_token() -> String
Generate a new CPSK token string using cryptographically secure randomness
Trait Implementations§
Source§impl Default for CpskValidator
impl Default for CpskValidator
Auto Trait Implementations§
impl !Freeze for CpskValidator
impl RefUnwindSafe for CpskValidator
impl Send for CpskValidator
impl Sync for CpskValidator
impl Unpin for CpskValidator
impl UnwindSafe for CpskValidator
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