pub struct AuthMiddlewareConfig {
pub enabled: bool,
pub ignore_paths: Vec<String>,
pub jwt_secret: String,
pub access_token_expire_secs: u64,
pub refresh_token_expire_secs: u64,
}Expand description
认证中间件
Fields§
§enabled: bool§ignore_paths: Vec<String>白名单路径 注意不含prefix前缀
jwt_secret: StringJWT secret
access_token_expire_secs: u64Access Token 过期(秒)
refresh_token_expire_secs: u64Refresh Token 过期(秒)
Trait Implementations§
Source§impl Clone for AuthMiddlewareConfig
impl Clone for AuthMiddlewareConfig
Source§fn clone(&self) -> AuthMiddlewareConfig
fn clone(&self) -> AuthMiddlewareConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthMiddlewareConfig
impl Debug for AuthMiddlewareConfig
Source§impl Default for AuthMiddlewareConfig
impl Default for AuthMiddlewareConfig
Source§impl<'de> Deserialize<'de> for AuthMiddlewareConfig
impl<'de> Deserialize<'de> for AuthMiddlewareConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AuthMiddlewareConfig
impl RefUnwindSafe for AuthMiddlewareConfig
impl Send for AuthMiddlewareConfig
impl Sync for AuthMiddlewareConfig
impl Unpin for AuthMiddlewareConfig
impl UnsafeUnpin for AuthMiddlewareConfig
impl UnwindSafe for AuthMiddlewareConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more