[][src]Struct iron_csrf::CsrfConfigBuilder

pub struct CsrfConfigBuilder { /* fields omitted */ }

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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> PersistentInto<Arc<Mutex<T>>> for T

impl<T> PersistentInto<Arc<RwLock<T>>> for T

impl<T> PersistentInto<Arc<T>> for T

impl<T> PersistentInto<T> for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Sealed<T> for T where
    T: ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,