UseJWTOnScope

Trait UseJWTOnScope 

Source
pub trait UseJWTOnScope<Claims, Algo, ReAuth, Args>
where Claims: Serialize + DeserializeOwned + 'static, Algo: Algorithm + Clone, Algo::SigningKey: Clone, ReAuth: Handler<Args, Output = Result<(), ActixWebError>>, Args: FromRequest + 'static,
{ // Required method fn use_jwt( self, authority: Authority<Claims, Algo, ReAuth, Args>, scope: Scope, ) -> Self; }
Expand description

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

Required Methods§

Source

fn use_jwt( self, authority: Authority<Claims, Algo, ReAuth, Args>, scope: Scope, ) -> Self

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<Claims, Algo, ReAuth, Args, T> UseJWTOnScope<Claims, Algo, ReAuth, Args> for Scope<T>
where T: ServiceFactory<ServiceRequest, Config = (), Error = ActixWebError, InitError = ()>, Claims: Serialize + DeserializeOwned + 'static, Algo: Algorithm + Clone + 'static, Algo::SigningKey: Clone, ReAuth: Handler<Args, Output = Result<(), ActixWebError>> + Clone, Args: FromRequest + 'static,

Source§

fn use_jwt( self, authority: Authority<Claims, Algo, ReAuth, Args>, scope: Scope, ) -> Self

Implementors§