pub struct ContextVerifier { /* private fields */ }Expand description
Verifier for context tokens.
Checks that the context token is valid (not expired, properly signed).
§Example
use hessra_context_token::{HessraContext, ContextVerifier};
use hessra_token_core::{KeyPair, TokenTimeConfig};
let keypair = KeyPair::new();
let public_key = keypair.public();
let token = HessraContext::new("agent:test".to_string(), TokenTimeConfig::default())
.issue(&keypair)
.expect("Failed to create context token");
ContextVerifier::new(token, public_key)
.verify()
.expect("Should verify");Implementations§
Auto Trait Implementations§
impl Freeze for ContextVerifier
impl RefUnwindSafe for ContextVerifier
impl Send for ContextVerifier
impl Sync for ContextVerifier
impl Unpin for ContextVerifier
impl UnsafeUnpin for ContextVerifier
impl UnwindSafe for ContextVerifier
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