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§
Sourcefn use_jwt<AppClaims: Claims>(
self,
extractors: Extractors<AppClaims>,
pool: Option<Pool>,
) -> App<impl ServiceFactory<ServiceRequest, Error = Error, Config = (), InitError = (), Response = ServiceResponse>>
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.