Struct iron_csrf::CsrfConfigBuilder
[−]
[src]
pub struct CsrfConfigBuilder { /* fields omitted */ }
A utility to help build a CsrfConfig
in an API backwards compatible way.
Methods
impl CsrfConfigBuilder
[src]
fn ttl_seconds(self, ttl_seconds: i64) -> Self
Set the TTL in seconds for CSRF cookies and tokens.
fn protected_methods(self, protected_methods: HashSet<Method>) -> Self
Set the HTTP methods that are require CSRF protection.
fn finish(self) -> Result<CsrfConfig, CsrfConfigError>
Validate and build the CsrfConfig
.