CsrfRequestExt

Trait CsrfRequestExt 

Source
pub trait CsrfRequestExt {
    // Required methods
    fn csrf_token(&self) -> &str;
    fn csrf_header_name(&self) -> &str;
    fn csrf_query_param(&self) -> &str;
    fn csrf_field_name(&self) -> &str;
}
Expand description

Provides access to request-level CSRF values.

Required Methods§

Source

fn csrf_token(&self) -> &str

Gets the CSRF token for inclusion in an HTTP request header, a query parameter, or a form field.

Source

fn csrf_header_name(&self) -> &str

Gets the name of the header in which to return the CSRF token, if the CSRF token is being returned in a header.

Source

fn csrf_query_param(&self) -> &str

Gets the name of the query param in which to return the CSRF token, if the CSRF token is being returned in a query param.

Source

fn csrf_field_name(&self) -> &str

Gets the name of the form field in which to return the CSRF token, if the CSRF token is being returned in a form field.

Implementations on Foreign Types§

Source§

impl<State> CsrfRequestExt for Request<State>
where State: Send + Sync + 'static,

Implementors§