mirror of
https://github.com/actix/actix-website
synced 2024-11-27 18:12:57 +01:00
mentioning required feature on the example code (#295)
Co-authored-by: Yuki Okushi <huyuumi.dev+love@gmail.com>
This commit is contained in:
parent
17a08f94fb
commit
ea12a77d6e
@ -90,6 +90,7 @@ A _signed_ cookie may be viewed but not modified by the client. A _private_ cook
|
|||||||
The constructors take a key as an argument. This is the private key for cookie session - when this value is changed, all session data is lost.
|
The constructors take a key as an argument. This is the private key for cookie session - when this value is changed, all session data is lost.
|
||||||
|
|
||||||
In general, you create a `SessionStorage` middleware and initialize it with specific backend implementation, such as a `CookieSession`. To access session data the [`Session`][requestsession] extractor must be used. This method returns a [_Session_][sessionobj] object, which allows us to get or set session data.
|
In general, you create a `SessionStorage` middleware and initialize it with specific backend implementation, such as a `CookieSession`. To access session data the [`Session`][requestsession] extractor must be used. This method returns a [_Session_][sessionobj] object, which allows us to get or set session data.
|
||||||
|
> `actix_session::storage::CookieSessionStore` is available on the crate feature "cookie-session".
|
||||||
|
|
||||||
<CodeBlock example="middleware" file="user_sessions.rs" section="user-session" />
|
<CodeBlock example="middleware" file="user_sessions.rs" section="user-session" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user