Module cookie

Module cookie 

Source
Expand description

The session backend using Cookie as a session storage.

§Example

#[macro_use]
extern crate finchers;
extern crate finchers_session;

use finchers::prelude::*;
use finchers_session::Session;
use finchers_session::cookie::CookieSession;

let backend = finchers_session::cookie::plain();

let endpoint = path!(@get /)
    .and(backend)
    .and_then(|session: Session<CookieSession>| {
        session.with(|_session| {
            // ...
        })
    });

Structs§

CookieBackend
CookieSession

Functions§

plain
Create a CookieSessionBackend without signing and encryption.
private
Create a CookieSessionBackend with encryption (requires feature = "secure").
signed
Create a CookieSessionBackend with signing (requires feature = "secure").