pub struct JwtRecognizer;Expand description
Recognizes JSON Web Tokens in header.payload.signature form.
§Examples
use cloakrs_core::{EntityType, Recognizer};
use cloakrs_patterns::JwtRecognizer;
let token = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.abc123456789_xyz";
let findings = JwtRecognizer.scan(token);
assert_eq!(findings[0].entity_type, EntityType::Jwt);Trait Implementations§
Source§impl Clone for JwtRecognizer
impl Clone for JwtRecognizer
Source§fn clone(&self) -> JwtRecognizer
fn clone(&self) -> JwtRecognizer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JwtRecognizer
impl Debug for JwtRecognizer
Source§impl Default for JwtRecognizer
impl Default for JwtRecognizer
Source§fn default() -> JwtRecognizer
fn default() -> JwtRecognizer
Returns the “default value” for a type. Read more
Source§impl Recognizer for JwtRecognizer
impl Recognizer for JwtRecognizer
Source§fn entity_type(&self) -> EntityType
fn entity_type(&self) -> EntityType
The entity type this recognizer detects.
Source§fn supported_locales(&self) -> &[Locale]
fn supported_locales(&self) -> &[Locale]
Locales this recognizer applies to. Empty means universal.
impl Copy for JwtRecognizer
Auto Trait Implementations§
impl Freeze for JwtRecognizer
impl RefUnwindSafe for JwtRecognizer
impl Send for JwtRecognizer
impl Sync for JwtRecognizer
impl Unpin for JwtRecognizer
impl UnsafeUnpin for JwtRecognizer
impl UnwindSafe for JwtRecognizer
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