pub trait Authenticator:
Send
+ Sync
+ 'static {
// Required method
fn authenticate<'a>(&'a self, ctx: &'a Context) -> AuthFuture<'a>;
}Expand description
Pluggable asynchronous authenticator resolving a Hyperlane Context into an AuthPrincipal.
Required Methods§
Sourcefn authenticate<'a>(&'a self, ctx: &'a Context) -> AuthFuture<'a>
fn authenticate<'a>(&'a self, ctx: &'a Context) -> AuthFuture<'a>
Authenticates the incoming request represented by ctx.
§Arguments
&'a self- Shared reference to self.&'a Context- Incoming request context.
§Returns
AuthFuture<'a>- Future resolving to the verifiedAuthPrincipalorAuthError.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Authenticator for ApiKeyAuthenticator
Implements Authenticator for ApiKeyAuthenticator.
impl Authenticator for BasicAuthenticator
Implements Authenticator for BasicAuthenticator.
impl Authenticator for CompositeAuthenticator
Implements Authenticator for CompositeAuthenticator.
impl Authenticator for JwtAuthenticator
Implements Authenticator for JwtAuthenticator.