pub struct ClientIdExtractor { /* private fields */ }
Expand description
Client identification extractor for various transport mechanisms
Implementations§
Source§impl ClientIdExtractor
impl ClientIdExtractor
Sourcepub fn register_token(&self, token: String, client_id: String)
pub fn register_token(&self, token: String, client_id: String)
Register an authentication token for a client
Sourcepub fn revoke_token(&self, token: &str)
pub fn revoke_token(&self, token: &str)
Remove an authentication token
Sourcepub fn list_tokens(&self) -> Vec<(String, String)>
pub fn list_tokens(&self) -> Vec<(String, String)>
List all registered tokens (for admin purposes)
Sourcepub fn extract_from_http_headers(
&self,
headers: &HashMap<String, String>,
) -> ClientId
pub fn extract_from_http_headers( &self, headers: &HashMap<String, String>, ) -> ClientId
Extract client ID from HTTP headers
Trait Implementations§
Source§impl Debug for ClientIdExtractor
impl Debug for ClientIdExtractor
Auto Trait Implementations§
impl Freeze for ClientIdExtractor
impl !RefUnwindSafe for ClientIdExtractor
impl Send for ClientIdExtractor
impl Sync for ClientIdExtractor
impl Unpin for ClientIdExtractor
impl !UnwindSafe for ClientIdExtractor
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