actix_jwt_session::builder

Trait UseJwt

Source
pub trait UseJwt {
    // Required method
    fn use_jwt<AppClaims: Claims>(
        self,
        extractors: Extractors<AppClaims>,
        pool: Option<Pool>,
    ) -> App<impl ServiceFactory<ServiceRequest, Error = Error, Config = (), InitError = (), Response = ServiceResponse>>;
}
Expand description

This trait gives the ability to call Self::use_jwt on the implemented type.

Required Methods§

Source

fn use_jwt<AppClaims: Claims>( self, extractors: Extractors<AppClaims>, pool: Option<Pool>, ) -> App<impl ServiceFactory<ServiceRequest, Error = Error, Config = (), InitError = (), Response = ServiceResponse>>

Calls wrap on the scope will passing the authority. Then it adds the scope as a service on self.

If there is a [crate::TokenSigner] set on the authority, it is clone it and adds it as app data on self.

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.

Implementations on Foreign Types§

Source§

impl<T> UseJwt for App<T>
where T: ServiceFactory<ServiceRequest, Config = (), Error = Error, InitError = (), Response = ServiceResponse> + 'static,

Source§

fn use_jwt<AppClaims: Claims>( self, extractors: Extractors<AppClaims>, pool: Option<Pool>, ) -> App<impl ServiceFactory<ServiceRequest, Error = Error, Config = (), InitError = (), Response = ServiceResponse>>

Implementors§