diff --git a/Cargo.lock b/Cargo.lock index 421965b..bb28cbc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -38,7 +38,7 @@ dependencies = [ "actix-rt", "actix_derive", "bitflags", - "bytes 1.1.0", + "bytes 1.2.0", "crossbeam-channel", "futures-core", "futures-sink", @@ -49,7 +49,7 @@ dependencies = [ "parking_lot 0.11.2", "pin-project-lite 0.2.9", "smallvec", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.6.10", ] @@ -62,7 +62,7 @@ dependencies = [ "actix-rt", "actix_derive", "bitflags", - "bytes 1.1.0", + "bytes 1.2.0", "crossbeam-channel", "futures-core", "futures-sink", @@ -73,7 +73,7 @@ dependencies = [ "parking_lot 0.12.1", "pin-project-lite 0.2.9", "smallvec", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.7.3", ] @@ -95,7 +95,7 @@ dependencies = [ "actix-web", "casbin", "loge", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -105,13 +105,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" dependencies = [ "bitflags", - "bytes 1.1.0", + "bytes 1.2.0", "futures-core", "futures-sink", "log", "memchr", "pin-project-lite 0.2.9", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.7.3", ] @@ -142,7 +142,7 @@ dependencies = [ "actix-web", "askama_escape", "bitflags", - "bytes 1.1.0", + "bytes 1.2.0", "derive_more", "futures-core", "http-range", @@ -168,7 +168,7 @@ dependencies = [ "base64", "bitflags", "brotli", - "bytes 1.1.0", + "bytes 1.2.0", "bytestring", "derive_more", "encoding_rs", @@ -205,7 +205,7 @@ dependencies = [ "actix-utils", "awc", "base64", - "bytes 1.1.0", + "bytes 1.2.0", "futures-core", "http", "log", @@ -214,7 +214,7 @@ dependencies = [ "serde_urlencoded", "slab", "socket2 0.4.4", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -250,7 +250,7 @@ checksum = "c9edfb0e7663d7fe18c8d5b668c9c1bcf79176b1dcc9d4da9592503209a6bfb0" dependencies = [ "actix-utils", "actix-web", - "bytes 1.1.0", + "bytes 1.2.0", "derive_more", "futures-core", "httparse", @@ -284,20 +284,41 @@ dependencies = [ "actix-session 0.5.0", "actix-tls", "actix-web", - "backoff", + "backoff 0.2.1", "derive_more", "futures-core", "log", "rand 0.8.5", "redis 0.19.0", - "redis-async", + "redis-async 0.8.1", "serde", "serde_json", "time 0.3.11", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.6.10", ] +[[package]] +name = "actix-redis" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38446dc11c743f4f0023b1067c7cfb8f2548f24418e31a193b324e35fa059279" +dependencies = [ + "actix 0.13.0", + "actix-rt", + "actix-service", + "actix-tls", + "actix-web", + "backoff 0.4.0", + "derive_more", + "futures-core", + "log", + "redis-async 0.13.0", + "time 0.3.11", + "tokio 1.20.0", + "tokio-util 0.7.3", +] + [[package]] name = "actix-router" version = "0.5.0" @@ -320,7 +341,7 @@ checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" dependencies = [ "actix-macros", "futures-core", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -337,7 +358,7 @@ dependencies = [ "mio 0.8.4", "num_cpus", "socket2 0.4.4", - "tokio 1.19.2", + "tokio 1.20.0", "tracing", ] @@ -387,6 +408,27 @@ dependencies = [ "tracing", ] +[[package]] +name = "actix-session" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "861c2463ccba4af8f272936fcf4999af6305492fc939bf0dfe71db86142ae843" +dependencies = [ + "actix 0.13.0", + "actix-redis 0.12.0", + "actix-service", + "actix-utils", + "actix-web", + "anyhow", + "async-trait", + "derive_more", + "futures-core", + "rand 0.8.5", + "serde", + "serde_json", + "tracing", +] + [[package]] name = "actix-test" version = "0.1.0-beta.13" @@ -407,7 +449,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -458,7 +500,7 @@ dependencies = [ "actix-utils", "actix-web-codegen", "ahash", - "bytes 1.1.0", + "bytes 1.2.0", "bytestring", "cfg-if 1.0.0", "cookie 0.16.0", @@ -492,11 +534,11 @@ dependencies = [ "actix-codec", "actix-http", "actix-web", - "bytes 1.1.0", + "bytes 1.2.0", "bytestring", "futures-core", "pin-project-lite 0.2.9", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -538,7 +580,7 @@ dependencies = [ "ahash", "arc-swap", "async-trait", - "bytes 1.1.0", + "bytes 1.2.0", "csv", "derive_more", "digest 0.10.3", @@ -556,7 +598,7 @@ dependencies = [ "serde_html_form", "serde_json", "subtle", - "tokio 1.19.2", + "tokio 1.20.0", "tracing", ] @@ -581,7 +623,7 @@ dependencies = [ "actix-http", "actix-web", "futures-core", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -600,12 +642,12 @@ name = "actix_redis" version = "1.0.0" dependencies = [ "actix 0.12.0", - "actix-redis", + "actix-redis 0.10.0", "actix-web", "env_logger 0.9.0", "futures-util", "log", - "redis-async", + "redis-async 0.8.1", "serde", ] @@ -816,7 +858,7 @@ dependencies = [ "async-graphql-value", "async-stream", "async-trait", - "bytes 1.1.0", + "bytes 1.2.0", "fast_chemail", "fnv", "futures-util", @@ -887,9 +929,9 @@ dependencies = [ [[package]] name = "async-graphql-parser" -version = "4.0.4" +version = "4.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c328e2cb0dade64333859f7a7e22c9e19a3767afaad673976a1d855c9bda5ffa" +checksum = "a73c90d34c7456bf28a764bfa201c41ac1929b3c376af1815d5f6b176bf74fe4" dependencies = [ "async-graphql-value", "pest", @@ -899,11 +941,11 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "4.0.4" +version = "4.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005292494ce718604a0dc1531e5827fe540761e1df44b064085711c5fde70b7c" +checksum = "b79f082786fccd251a8e9615df7f8d45dc8c5305f89062e79a9be570bcd08585" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "indexmap", "serde", "serde_json", @@ -1021,7 +1063,7 @@ dependencies = [ "actix-utils", "ahash", "base64", - "bytes 1.1.0", + "bytes 1.2.0", "cfg-if 1.0.0", "cookie 0.16.0", "derive_more", @@ -1040,7 +1082,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -1066,6 +1108,17 @@ dependencies = [ "rand 0.7.3", ] +[[package]] +name = "backoff" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" +dependencies = [ + "getrandom 0.2.7", + "instant", + "rand 0.8.5", +] + [[package]] name = "base-x" version = "0.2.11" @@ -1268,7 +1321,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4531c8a9fe2fb94e0d2afdf6bb4effd4797baf98dd26b6e20be71a92ac78e8d" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", ] [[package]] @@ -1303,9 +1356,9 @@ checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" [[package]] name = "bytes" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "f0b3de4a0c5e67e16066a0715723abd91edc2f9001d09c46e1dca929351e130e" dependencies = [ "serde", ] @@ -1316,7 +1369,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b6a75fd3048808ef06af5cd79712be8111960adaf89d90250974b38fc3928a" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", ] [[package]] @@ -1339,7 +1392,7 @@ dependencies = [ "ritelinked", "serde", "thiserror", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -1451,9 +1504,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.8" +version = "3.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190814073e85d238f31ff738fcb0bf6910cedeb73376c87cd69291028966fd83" +checksum = "54635806b078b7925d6e36810b1755f2a4b5b4d57560432c1ecf60bcbe10602b" dependencies = [ "atty", "bitflags", @@ -1527,11 +1580,11 @@ version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a604e93b79d1808327a6fca85a6f2d69de66461e7620f5a4cbf5fb4d1d7c948" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "futures-core", "memchr", "pin-project-lite 0.2.9", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.7.3", ] @@ -1727,9 +1780,9 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ccfd8c0ee4cce11e45b3fd6f9d5e69e0cc62912aa6a0cb1bf4617b0eba5a12f" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array 0.14.5", "typenum", @@ -1828,7 +1881,7 @@ dependencies = [ "num_cpus", "retain_mut", "serde", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -1840,7 +1893,7 @@ dependencies = [ "deadpool", "log", "serde", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-postgres", ] @@ -1850,7 +1903,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" dependencies = [ - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -2194,7 +2247,7 @@ dependencies = [ [[package]] name = "fluent-template-macros" version = "0.7.1" -source = "git+https://github.com/robjtede/fluent-templates.git?branch=fix-circ-dep#eef1c940b8388a0a9770edb5647bfaf7cd34ea26" +source = "git+https://github.com/XAMPPRocky/fluent-templates.git?rev=82b50baf6232e1ce2e9629ce2a8fcc12ab5d942c#82b50baf6232e1ce2e9629ce2a8fcc12ab5d942c" dependencies = [ "flume", "ignore", @@ -2208,7 +2261,7 @@ dependencies = [ [[package]] name = "fluent-templates" version = "0.7.1" -source = "git+https://github.com/robjtede/fluent-templates.git?branch=fix-circ-dep#eef1c940b8388a0a9770edb5647bfaf7cd34ea26" +source = "git+https://github.com/XAMPPRocky/fluent-templates.git?rev=82b50baf6232e1ce2e9629ce2a8fcc12ab5d942c#82b50baf6232e1ce2e9629ce2a8fcc12ab5d942c" dependencies = [ "arc-swap", "fluent", @@ -2238,7 +2291,7 @@ dependencies = [ "futures-core", "futures-sink", "pin-project", - "spin 0.9.3", + "spin 0.9.4", ] [[package]] @@ -2611,7 +2664,7 @@ version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "fnv", "futures-core", "futures-sink", @@ -2619,16 +2672,16 @@ dependencies = [ "http", "indexmap", "slab", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.7.3", "tracing", ] [[package]] name = "handlebars" -version = "4.3.1" +version = "4.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66d0c1b6e3abfd1e72818798925e16e02ed77e1b47f6c25a95a23b377ee4299" +checksum = "360d9740069b2f6cbb63ce2dbaa71a20d3185350cbb990d7bebeb9318415eb17" dependencies = [ "log", "pest", @@ -2650,9 +2703,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "607c8a29735385251a339424dd462993c0fed8fa09d378f259377df08c126022" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ "ahash", ] @@ -2672,7 +2725,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d452c155cb93fecdfb02a73dd57b5d8e442c2063bd7aac72f1bc5e4263a43086" dependencies = [ - "hashbrown 0.12.2", + "hashbrown 0.12.3", ] [[package]] @@ -2761,7 +2814,7 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "fnv", "itoa 1.0.2", ] @@ -2782,7 +2835,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "http", "pin-project-lite 0.2.9", ] @@ -2793,7 +2846,7 @@ version = "1.0.0" dependencies = [ "actix-web", "awc", - "clap 3.2.8", + "clap 3.2.14", "env_logger 0.9.0", "log", "url", @@ -2865,7 +2918,7 @@ version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "futures-channel", "futures-core", "futures-util", @@ -2877,7 +2930,7 @@ dependencies = [ "itoa 1.0.2", "pin-project-lite 0.2.9", "socket2 0.4.4", - "tokio 1.19.2", + "tokio 1.20.0", "tower-service", "tracing", "want", @@ -2902,10 +2955,10 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "hyper 0.14.20", "native-tls", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-native-tls", ] @@ -2957,7 +3010,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", - "hashbrown 0.12.2", + "hashbrown 0.12.3", "serde", ] @@ -3144,7 +3197,7 @@ name = "jsonrpc-example" version = "1.0.0" dependencies = [ "actix-web", - "bytes 1.1.0", + "bytes 1.2.0", "env_logger 0.9.0", "futures-util", "log", @@ -3567,15 +3620,15 @@ name = "mongodb" version = "1.0.0" dependencies = [ "actix-web", - "mongodb 2.2.2", + "mongodb 2.3.0", "serde", ] [[package]] name = "mongodb" -version = "2.2.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28f3943e379e9dcaaab9dc319c308a8caaf9e7ff083c6838dff740afbba59df7" +checksum = "b95afe97b0c799fdf69cd960272a2cb9662d077bd6efd84eb722bb9805d47554" dependencies = [ "async-trait", "base64", @@ -3607,7 +3660,7 @@ dependencies = [ "strsim 0.10.0", "take_mut", "thiserror", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-rustls", "tokio-util 0.7.3", "trust-dns-proto", @@ -3619,11 +3672,11 @@ dependencies = [ [[package]] name = "multer" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f8f35e687561d5c1667590911e6698a8cb714a134a7505718a182e7bc9d3836" +checksum = "a30ba6d97eb198c5e8a35d67d5779d6680cca35652a60ee90fc23dc431d4fde8" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "encoding_rs", "futures-util", "http", @@ -3631,7 +3684,7 @@ dependencies = [ "log", "memchr", "mime", - "spin 0.9.3", + "spin 0.9.4", "version_check", ] @@ -3670,7 +3723,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06f5abe1c0f91831afd4d35298c08d958e80144869757b913891e5b0d00c2c96" dependencies = [ "bufstream", - "bytes 1.1.0", + "bytes 1.2.0", "io-enum", "libc", "lru", @@ -3700,7 +3753,7 @@ dependencies = [ "bitflags", "bitvec", "byteorder", - "bytes 1.1.0", + "bytes 1.2.0", "cc", "chrono", "cmake", @@ -3966,7 +4019,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" dependencies = [ "dlv-list", - "hashbrown 0.12.2", + "hashbrown 0.12.3", ] [[package]] @@ -3981,9 +4034,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.1.0" +version = "6.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" +checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4" [[package]] name = "parking_lot" @@ -4270,7 +4323,7 @@ checksum = "878c6cbf956e03af9aa8204b407b9cbf47c072164800aa918c516cd4b056c50c" dependencies = [ "base64", "byteorder", - "bytes 1.1.0", + "bytes 1.2.0", "fallible-iterator", "hmac 0.12.1", "md-5 0.10.1", @@ -4286,7 +4339,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebd6e8b7189a73169290e89bd24c771071f1012d8fe6f738f5226531f0b03d89" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "fallible-iterator", "postgres-protocol", ] @@ -4299,9 +4352,9 @@ checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "pq-sys" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" +checksum = "3b845d6d8ec554f972a2c5298aad68953fd64e7441e846075450b44656a016d1" dependencies = [ "vcpkg", ] @@ -4314,9 +4367,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1516508b396cefe095485fdce673007422f5e48e82934b7b423dc26aa5e6a4" +checksum = "da6ffbe862780245013cb1c0a48c4e44b7d665548088f91f6b90876d0625e4c2" dependencies = [ "proc-macro2", "syn", @@ -4377,7 +4430,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71adf41db68aa0daaefc69bb30bcd68ded9b9abaad5d1fbb6304c4fb390e083e" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "prost-derive", ] @@ -4565,7 +4618,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a6ddfecac9391fed21cce10e83c65fa4abafd77df05c98b1c647c65374ce9b3" dependencies = [ "async-trait", - "bytes 1.1.0", + "bytes 1.2.0", "combine 4.6.4", "dtoa", "futures-util", @@ -4574,7 +4627,7 @@ dependencies = [ "percent-encoding", "pin-project-lite 0.2.9", "sha1 0.6.1", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-native-tls", "tokio-util 0.6.10", "url", @@ -4587,14 +4640,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a80b5f38d7f5a020856a0e16e40a9cfabf88ae8f0e4c2dcd8a3114c1e470852" dependencies = [ "async-trait", - "bytes 1.1.0", + "bytes 1.2.0", "combine 4.6.4", "dtoa", "futures-util", "itoa 0.4.8", "percent-encoding", "pin-project-lite 0.2.9", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.6.10", "url", ] @@ -4605,21 +4658,35 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8f5a920ab6d700f442cadd6006a2a43f7ec0a5223065f3eaa517fc3fca6d2b3" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "futures-channel", "futures-sink", "futures-util", "log", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.6.10", ] [[package]] -name = "redis_session" +name = "redis-async" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777130e406c74c28b6cddc0194fcdc2553b5a8795eef9f6384bd3b70a07ba3f" +dependencies = [ + "bytes 1.2.0", + "futures-channel", + "futures-sink", + "futures-util", + "log", + "tokio 1.20.0", + "tokio-util 0.7.3", +] + +[[package]] +name = "redis-session-example" version = "1.0.0" dependencies = [ - "actix-redis", - "actix-session 0.5.0", + "actix-session 0.7.0", "actix-test", "actix-web", "env_logger 0.9.0", @@ -4637,7 +4704,7 @@ checksum = "dcabf56cf2286df31463567c8f8d67ee582e32acf78aaa6f7303f791006aa75d" dependencies = [ "redis 0.21.5", "tang-rs", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -4735,7 +4802,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64", - "bytes 1.1.0", + "bytes 1.2.0", "encoding_rs", "futures-core", "futures-util", @@ -4755,7 +4822,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-native-tls", "tower-service", "url", @@ -4861,7 +4928,7 @@ checksum = "1db30db44ea73551326269adcf7a2169428a054f14faf9e1768f2163494f2fa2" dependencies = [ "async-trait", "base64", - "bytes 1.1.0", + "bytes 1.2.0", "crc32fast", "futures", "http", @@ -4874,7 +4941,7 @@ dependencies = [ "rustc_version 0.4.0", "serde", "serde_json", - "tokio 1.19.2", + "tokio 1.20.0", "xml-rs", ] @@ -4892,7 +4959,7 @@ dependencies = [ "serde", "serde_json", "shlex", - "tokio 1.19.2", + "tokio 1.20.0", "zeroize", ] @@ -4903,7 +4970,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7aae4677183411f6b0b412d66194ef5403293917d66e70ab118f07cc24c5b14d" dependencies = [ "async-trait", - "bytes 1.1.0", + "bytes 1.2.0", "futures", "rusoto_core", "xml-rs", @@ -4916,7 +4983,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5ae95491c8b4847931e291b151127eccd6ff8ca13f33603eb3d0035ecb05272" dependencies = [ "base64", - "bytes 1.1.0", + "bytes 1.2.0", "chrono", "digest 0.9.0", "futures", @@ -4932,7 +4999,7 @@ dependencies = [ "rustc_version 0.4.0", "serde", "sha2 0.9.9", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -5251,9 +5318,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.138" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1578c6245786b9d168c5447eeacfb96856573ca56c9d68fdcf394be134882a47" +checksum = "fc855a42c7967b7c369eb5860f7164ef1f6f81c20c7cc1141f2a604e18723b03" dependencies = [ "serde_derive", ] @@ -5269,9 +5336,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.138" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023e9b1467aef8a10fb88f25611870ada9800ef7e22afce356bb0d2387b6f27c" +checksum = "6f2122636b9fe3b81f1cb25099fcf2d3f542cdb1d45940d56c713158884a05da" dependencies = [ "proc-macro2", "quote", @@ -5346,7 +5413,7 @@ dependencies = [ "futures-util", "log", "parking_lot 0.12.1", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-stream", ] @@ -5436,7 +5503,7 @@ dependencies = [ "actix-web", "env_logger 0.9.0", "log", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -5477,9 +5544,12 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "slab" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] [[package]] name = "slug" @@ -5581,9 +5651,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530c2b0d0bf8b69304b39fe2001993e267461948b890cd037d8ad4293fa1a0d" +checksum = "7f6002a767bff9e83f8eeecf883ecb8011875a21ae8da43bffb817a57e78cc09" dependencies = [ "lock_api", ] @@ -5619,7 +5689,7 @@ dependencies = [ "atoi", "bitflags", "byteorder", - "bytes 1.1.0", + "bytes 1.2.0", "crc", "crossbeam-queue", "either", @@ -5684,7 +5754,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "874e93a365a598dc3dadb197565952cb143ae4aa716f7bcc933a8d836f6bf89f" dependencies = [ "once_cell", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-rustls", ] @@ -6169,11 +6239,12 @@ dependencies = [ [[package]] name = "tokio" -version = "1.19.2" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51a52ed6686dd62c320f9b89299e9dfb46f730c7a48e635c19f21d116cb1439" +checksum = "57aec3cfa4c296db7255446efb4928a6be304b431a806216105542a67b6ca82e" dependencies = [ - "bytes 1.1.0", + "autocfg", + "bytes 1.2.0", "libc", "memchr", "mio 0.8.4", @@ -6205,7 +6276,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -6217,7 +6288,7 @@ dependencies = [ "futures-util", "openssl", "openssl-sys", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -6248,7 +6319,7 @@ checksum = "19c88a47a23c5d2dc9ecd28fb38fba5fc7e5ddc1fe64488ec145076b0c71c8ae" dependencies = [ "async-trait", "byteorder", - "bytes 1.1.0", + "bytes 1.2.0", "fallible-iterator", "futures", "log", @@ -6259,7 +6330,7 @@ dependencies = [ "postgres-protocol", "postgres-types", "socket2 0.4.4", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-util 0.7.3", ] @@ -6270,7 +6341,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ "rustls 0.20.6", - "tokio 1.19.2", + "tokio 1.20.0", "webpki 0.22.0", ] @@ -6282,7 +6353,7 @@ checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" dependencies = [ "futures-core", "pin-project-lite 0.2.9", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -6315,12 +6386,12 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "futures-core", "futures-sink", "log", "pin-project-lite 0.2.9", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -6329,11 +6400,11 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" dependencies = [ - "bytes 1.1.0", + "bytes 1.2.0", "futures-core", "futures-sink", "pin-project-lite 0.2.9", - "tokio 1.19.2", + "tokio 1.20.0", "tracing", ] @@ -6416,7 +6487,7 @@ dependencies = [ "smallvec", "thiserror", "tinyvec", - "tokio 1.19.2", + "tokio 1.20.0", "url", ] @@ -6436,7 +6507,7 @@ dependencies = [ "resolv-conf", "smallvec", "thiserror", - "tokio 1.19.2", + "tokio 1.20.0", "trust-dns-proto", ] @@ -7018,7 +7089,7 @@ dependencies = [ "env_logger 0.9.0", "futures-util", "log", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-stream", ] @@ -7046,7 +7117,7 @@ dependencies = [ "futures-util", "log", "rand 0.8.5", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -7074,7 +7145,7 @@ dependencies = [ "env_logger 0.9.0", "futures-util", "log", - "tokio 1.19.2", + "tokio 1.20.0", ] [[package]] @@ -7102,14 +7173,14 @@ dependencies = [ "actix-web", "actix-web-actors", "byteorder", - "bytes 1.1.0", + "bytes 1.2.0", "env_logger 0.9.0", "futures-util", "log", "rand 0.8.5", "serde", "serde_json", - "tokio 1.19.2", + "tokio 1.20.0", "tokio-stream", "tokio-util 0.7.3", ] @@ -7397,9 +7468,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.5.6" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b578acffd8516a6c3f2a1bdefc1ec37e547bb4e0fb8b6b01a4cafc886b4442" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" [[package]] name = "zstd" diff --git a/auth/redis-session/Cargo.toml b/auth/redis-session/Cargo.toml index 9e5db69..9e6e3c4 100644 --- a/auth/redis-session/Cargo.toml +++ b/auth/redis-session/Cargo.toml @@ -1,12 +1,11 @@ [package] -name = "redis_session" +name = "redis-session-example" version = "1.0.0" edition = "2021" [dependencies] actix-web = "4" -actix-session = "0.5" -actix-redis = "0.10" +actix-session = { version = "0.7", features = ["redis-actor-session"] } env_logger = "0.9" log = "0.4" diff --git a/auth/redis-session/src/main.rs b/auth/redis-session/src/main.rs index 6efeac2..a60649b 100644 --- a/auth/redis-session/src/main.rs +++ b/auth/redis-session/src/main.rs @@ -4,8 +4,7 @@ //! At login, the session key changes and session state in cache re-assigns. //! At logout, session state in cache is removed and cookie is invalidated. //! -use actix_redis::RedisSession; -use actix_session::Session; +use actix_session::{storage::RedisActorSessionStore, Session, SessionMiddleware}; use actix_web::{ middleware, web, web::{get, post, resource}, @@ -85,7 +84,13 @@ async fn main() -> std::io::Result<()> { HttpServer::new(move || { App::new() // redis session middleware - .wrap(RedisSession::new("127.0.0.1:6379", private_key.master())) + .wrap( + SessionMiddleware::builder( + RedisActorSessionStore::new("127.0.0.1:6379"), + private_key.clone(), + ) + .build(), + ) // enable logger - always register Actix Web Logger middleware last .wrap(middleware::Logger::default()) .service(resource("/").route(get().to(index))) @@ -115,8 +120,12 @@ mod test { let srv = actix_test::start(move || { App::new() .wrap( - RedisSession::new("127.0.0.1:6379", private_key.master()) - .cookie_name("test-session"), + SessionMiddleware::builder( + RedisActorSessionStore::new("127.0.0.1:6379"), + private_key.clone(), + ) + .cookie_name("test-session".to_string()) + .build(), ) .wrap(middleware::Logger::default()) .service(resource("/").route(get().to(index)))