pub struct SimpleVerifier { /* private fields */ }Expand description
Simple synchronous verifier for use in non-async contexts
Implementations§
Source§impl SimpleVerifier
impl SimpleVerifier
Sourcepub fn new(
key: VerifyingKey,
issuer: impl Into<String>,
audience: impl Into<String>,
) -> Self
pub fn new( key: VerifyingKey, issuer: impl Into<String>, audience: impl Into<String>, ) -> Self
Create a new simple verifier
Sourcepub fn verify(
&self,
token: &str,
expected_origin: Option<&str>,
expected_client_ip: Option<&str>,
) -> Result<AuthContext, VerifyError>
pub fn verify( &self, token: &str, expected_origin: Option<&str>, expected_client_ip: Option<&str>, ) -> Result<AuthContext, VerifyError>
Verify a token synchronously
Auto Trait Implementations§
impl Freeze for SimpleVerifier
impl RefUnwindSafe for SimpleVerifier
impl Send for SimpleVerifier
impl Sync for SimpleVerifier
impl Unpin for SimpleVerifier
impl UnsafeUnpin for SimpleVerifier
impl UnwindSafe for SimpleVerifier
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