pub struct KeyStore { /* private fields */ }Expand description
In-memory virtual key store backed by DashMap for concurrent access.
Implementations§
Source§impl KeyStore
impl KeyStore
Sourcepub fn from_config(
master_key: Option<String>,
keys: &[VirtualKeyConfig],
) -> Self
pub fn from_config( master_key: Option<String>, keys: &[VirtualKeyConfig], ) -> Self
Build a key store from the proxy configuration values.
Sourcepub fn is_master_key(&self, token: &str) -> bool
pub fn is_master_key(&self, token: &str) -> bool
Check whether token matches the configured master key.
Sourcepub fn get(&self, token: &str) -> Option<VirtualKeyConfig>
pub fn get(&self, token: &str) -> Option<VirtualKeyConfig>
Look up a virtual key configuration by its token string.
Auto Trait Implementations§
impl Freeze for KeyStore
impl !RefUnwindSafe for KeyStore
impl Send for KeyStore
impl Sync for KeyStore
impl Unpin for KeyStore
impl UnsafeUnpin for KeyStore
impl UnwindSafe for KeyStore
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