pub trait TokenVerifier:
Send
+ Sync
+ 'static {
// Required method
fn verify<'a>(
&'a self,
token: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Principal, TokenError>> + Send + 'a>>;
}Expand description
Checks an access token and identifies its holder.
Implementations must check that the token was issued for this server
(audience), is unexpired, and is authentic; the specification forbids
accepting tokens meant for other resources. The oauth feature provides
JwtVerifier for JWT access tokens; implement this trait for other
formats (for example token introspection).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".