[−][src]Struct iron_csrf::CsrfConfigBuilder
A utility to help build a CsrfConfig
in an API backwards compatible way.
Implementations
impl CsrfConfigBuilder
[src]
pub fn ttl_seconds(self, ttl_seconds: i64) -> Self
[src]
Set the TTL in seconds for CSRF cookies and tokens.
Default: 3600
pub fn protected_methods(self, protected_methods: HashSet<Method>) -> Self
[src]
Set the HTTP methods that are require CSRF protection.
Default: POST
, PUT
, PATCH
, DELETE
pub fn secure_cookie(self, secure_cookie: bool) -> Self
[src]
Set the Secure
flag on the CSRF cookie. If this is set to true, then user agents will
only send the cookie over HTTPS.
Default: false/absent.
pub fn finish(self) -> Result<CsrfConfig, CsrfConfigError>
[src]
Validate and build the CsrfConfig
.
Auto Trait Implementations
impl RefUnwindSafe for CsrfConfigBuilder
impl Send for CsrfConfigBuilder
impl Sync for CsrfConfigBuilder
impl Unpin for CsrfConfigBuilder
impl UnwindSafe for CsrfConfigBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> PersistentInto<Arc<Mutex<T>>> for T
fn persistent_into(self) -> Arc<Mutex<T>>
impl<T> PersistentInto<Arc<RwLock<T>>> for T
fn persistent_into(self) -> Arc<RwLock<T>>
impl<T> PersistentInto<Arc<T>> for T
fn persistent_into(self) -> Arc<T>
impl<T> PersistentInto<T> for T
fn persistent_into(self) -> T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
T: ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,