rama::net::user::auth

Trait Authority

pub trait Authority<C, L>:
    Send
    + Sync
    + 'static {
    // Required method
    fn authorized(
        &self,
        credentials: C,
    ) -> impl Future<Output = Option<Extensions>> + Send;
}
Expand description

The Authority trait is used to determine if a set of Credentials are authorized.

Required Methods§

fn authorized( &self, credentials: C, ) -> impl Future<Output = Option<Extensions>> + Send

Returns true if the credentials are authorized, otherwise false.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<A, C, L> Authority<C, L> for A
where A: AuthoritySync<C, L>, C: Credentials + Send + 'static, L: 'static,