pub trait TokenVerifier<P: PeerId>:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn verify(&self, token: &str, request: &PeerRequest<P>) -> Decision;
}Expand description
Required Methods§
Sourcefn verify(&self, token: &str, request: &PeerRequest<P>) -> Decision
fn verify(&self, token: &str, request: &PeerRequest<P>) -> Decision
Verifies token for the request’s peer and returns what it authorizes.
The token is an argument of its own, so a token that does not come from the session’s setup can go through the same verifier.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".