pub struct SessionMiddleware { /* private fields */ }Expand description
Builder / configuration.
Implementations§
Source§impl SessionMiddleware
impl SessionMiddleware
Cookie name (default "tako_session").
Sourcepub fn ttl_secs(self, secs: u64) -> Self
pub fn ttl_secs(self, secs: u64) -> Self
Backwards-compatible idle TTL setter (sets idle_secs, leaves
absolute_secs at the default 24 h cap).
Sourcepub fn ttl(self, ttl: SessionTtl) -> Self
pub fn ttl(self, ttl: SessionTtl) -> Self
Sets the full TTL policy.
Sourcepub fn same_site(self, ss: SameSite) -> Self
pub fn same_site(self, ss: SameSite) -> Self
Sets the SameSite attribute. Default: Lax. Note that None requires
Secure = true per all major browsers.
Sourcepub fn handle(&self) -> SessionStoreHandle
pub fn handle(&self) -> SessionStoreHandle
Returns a programmatic handle for revocation flows.
Trait Implementations§
Source§impl Default for SessionMiddleware
impl Default for SessionMiddleware
Auto Trait Implementations§
impl Freeze for SessionMiddleware
impl RefUnwindSafe for SessionMiddleware
impl Send for SessionMiddleware
impl Sync for SessionMiddleware
impl Unpin for SessionMiddleware
impl UnsafeUnpin for SessionMiddleware
impl UnwindSafe for SessionMiddleware
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