pub trait TokenVerifier:
Send
+ Sync
+ 'static {
// Required method
fn verify<'a>(&'a self, token: &'a str) -> VerifyFuture<'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§
Sourcefn verify<'a>(&'a self, token: &'a str) -> VerifyFuture<'a>
fn verify<'a>(&'a self, token: &'a str) -> VerifyFuture<'a>
Verifies token (the value after Bearer ).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".