Commit Graph
11 Commits
Author SHA1 Message Date
David Pedersen 700617963f Move private and signed cookies behind feature flags (#949)
* move signed cookies into their own module

* Require features for private/signed cookies

* enable "cookie" feature when enabling private/signed cookies

* add `#[cfg]`s in a few more places
2022-04-27 10:11:16 +02:00
David Pedersen 01a4c88d7a Add PrivateCookieJar (#900) 2022-04-01 16:37:55 +02:00
David Pedersen da3ca22301 Fix SignedCookieJar with custom key type (#899) 2022-04-01 11:40:42 +02:00
Paolo Barbolini 1b4c54c6e6 axum-extra: re-export the Expiration and SameSite structs from the cookie crate (#898) 2022-04-01 10:46:43 +02:00
Evan SchwartzandDavid Pedersen 3084dc10ca Accept &str for Redirect (#889)
* Accept &str for Redirect

* Fix doc example

* fix more docs examples

* update changelog

* fix changelog label

Co-authored-by: David Pedersen <[email protected]>
2022-03-31 10:03:06 +02:00
Jonas Platte 80753f8f5c Remove unnecessary mut from (Signed)CookieJar examples (#850) 2022-03-10 12:53:51 +01:00
David PedersenandJonas Platte f045f2356c Add cookie management to axum-extra (#816)
* Cookie management

* fix feature

* Update axum-extra/src/extract/cookie.rs

Co-authored-by: Jonas Platte <[email protected]>

* add tests

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

* less convoluted wording

* changelog

* Make the jars themselves implement `IntoResponseParts`

* dedup tests

* fix docs

Co-authored-by: Jonas Platte <[email protected]>
2022-03-04 10:53:36 +01:00
David PedersenandJonas Platte b1ef0be1a7 Remove RequestParts::take_extensions (#699)
* Remove `RequestParts::take_extensions`

* fix out of date docs

* Remove RequestAlreadyExtracted and replace it with BodyAlreadyExtracted

* fix docs

* fix test

* Update axum-core/src/extract/mod.rs

Co-authored-by: Jonas Platte <[email protected]>

* Remove macro only used once

Co-authored-by: Jonas Platte <[email protected]>
2022-01-23 18:01:52 +01:00
Kai Jewson dfb06e721c Introduce Response type alias as a shorthand for Response<BoxBody> (#590)
* Introduce `Response` type alias as a shorthand

* Don't re-export `Response` at the crate root
2021-12-05 19:16:46 +01:00
Kai Jewson 2b6dba49cb Remove the associated Body type on IntoResponse (#571) 2021-11-28 18:52:18 +01:00
David Pedersen 96b353b556 Add Cached extractor (#565)
* extra: Add `Cached` extractor

`Cached` wraps another extractor and caches its result in request
extensions.

* Use newtype to avoid overriding extensions of the same type

* Rename type param
2021-11-25 10:14:31 +00:00