Trait salvo::prelude::JwtAuthDepotExt
source · pub trait JwtAuthDepotExt {
fn jwt_auth_token(&self) -> Option<&String>;
fn jwt_auth_data<C>(&self) -> Option<&TokenData<C>>
where
C: 'static + DeserializeOwned + Send + Sync;
fn jwt_auth_state(&self) -> JwtAuthState;
}
Available on crate feature
jwt-auth
only.Expand description
JwtAuthDepotExt
Required Methods§
sourcefn jwt_auth_token(&self) -> Option<&String>
fn jwt_auth_token(&self) -> Option<&String>
get jwt auth token reference from depot.
sourcefn jwt_auth_data<C>(&self) -> Option<&TokenData<C>>where
C: 'static + DeserializeOwned + Send + Sync,
fn jwt_auth_data<C>(&self) -> Option<&TokenData<C>>where
C: 'static + DeserializeOwned + Send + Sync,
get jwt auth decoded data from depot.
sourcefn jwt_auth_state(&self) -> JwtAuthState
fn jwt_auth_state(&self) -> JwtAuthState
get jwt auth state from depot.