mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-07 00:00:15 +02:00
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
//! Cookie parsing and cookie jar management.
|
||||
//!
|
||||
//! See [`CookieJar`], [`SignedCookieJar`], and [`PrivateCookieJar`] for more details.
|
||||
//!
|
||||
//! ## `Key::derive_from`
|
||||
//!
|
||||
//! The [`Key::derive_from`] method is provided by the underlying [`cookie`] crate, whose docs
|
||||
//! refer to the `key-expansion` feature. In `axum-extra`, enable **`cookie-key-expansion`**
|
||||
//! instead (see the [crate-level feature list](crate#feature-flags)).
|
||||
|
||||
use axum_core::{
|
||||
extract::FromRequestParts,
|
||||
@@ -25,7 +31,12 @@ pub use self::signed::SignedCookieJar;
|
||||
|
||||
pub use cookie::{Cookie, Expiration, SameSite};
|
||||
|
||||
/// Cookie signing and encryption key.
|
||||
///
|
||||
/// When using [`Key::derive_from`], enable the **`cookie-key-expansion`** feature on
|
||||
/// `axum-extra` (not `key-expansion` from the [`cookie`] crate).
|
||||
#[cfg(any(feature = "cookie-signed", feature = "cookie-private"))]
|
||||
#[doc(inline)]
|
||||
pub use cookie::Key;
|
||||
|
||||
/// Extractor that grabs cookies from the request and manages the jar.
|
||||
|
||||
Reference in New Issue
Block a user