pub struct CsrfDoubleSubmitCookie {
pub http_only: bool,
pub secure: bool,
pub same_site: SameSite,
}Expand description
Cookie flags for tokens when using the Double-Submit Cookie pattern.
http_only: Must befalseso client code can read the token and mirror it into a header or form field.secure: Should betruein production to restrict cookies to HTTPS.same_site: ChooseStrictorLaxdepending on your cross-site needs.
Fields§
§http_only: boolIf true, JavaScript cannot read the cookie
secure: boolRestrict cookies to HTTPS in production
same_site: SameSiteSameSite policy controlling cross-site cookie sending
Trait Implementations§
Source§impl Clone for CsrfDoubleSubmitCookie
impl Clone for CsrfDoubleSubmitCookie
Source§fn clone(&self) -> CsrfDoubleSubmitCookie
fn clone(&self) -> CsrfDoubleSubmitCookie
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CsrfDoubleSubmitCookie
impl RefUnwindSafe for CsrfDoubleSubmitCookie
impl Send for CsrfDoubleSubmitCookie
impl Sync for CsrfDoubleSubmitCookie
impl Unpin for CsrfDoubleSubmitCookie
impl UnwindSafe for CsrfDoubleSubmitCookie
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