1
0
mirror of https://github.com/actix/actix-website synced 2024-11-30 19:14:36 +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:
Ege 2022-11-10 04:02:31 +03:00 committed by GitHub
parent 17a08f94fb
commit ea12a77d6e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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" />