From 9716646992fb95ca539400646a6c9aec02db2763 Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sat, 8 Jun 2024 15:31:22 +0200 Subject: [PATCH 01/13] Began supporting gamma 2 --- backend/Cargo.lock | 1372 +++++++++++++++++----------------- backend/src/bin/server.rs | 3 +- backend/src/handlers/auth.rs | 9 +- backend/src/utils/gamma.rs | 33 +- 4 files changed, 735 insertions(+), 682 deletions(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index a059abe..2ee38a3 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -14,13 +14,14 @@ dependencies = [ [[package]] name = "actix" -version = "0.13.0" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f728064aca1c318585bf4bb04ffcfac9e75e508ab4e8b1bd9ba5dfe04e2cbed5" +checksum = "fb72882332b6d6282f428b77ba0358cb2687e61a6f6df6a6d3871e8a177c2d4f" dependencies = [ + "actix-macros", "actix-rt", "actix_derive", - "bitflags 1.3.2", + "bitflags 2.5.0", "bytes", "crossbeam-channel", "futures-core", @@ -38,34 +39,34 @@ dependencies = [ [[package]] name = "actix-codec" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" +checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "bytes", "futures-core", "futures-sink", - "log", "memchr", "pin-project-lite", "tokio", "tokio-util", + "tracing", ] [[package]] name = "actix-http" -version = "3.6.0" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d223b13fd481fc0d1f83bb12659ae774d9e3601814c68a0bc539731698cca743" +checksum = "4eb9843d84c775696c37d9a418bbb01b932629d01870722c0f13eb3f95e2536d" dependencies = [ "actix-codec", "actix-rt", "actix-service", "actix-utils", - "ahash 0.8.9", - "base64 0.21.7", - "bitflags 2.4.2", + "ahash", + "base64 0.22.1", + "bitflags 2.5.0", "brotli", "bytes", "bytestring", @@ -74,7 +75,7 @@ dependencies = [ "flate2", "futures-core", "h2", - "http 0.2.7", + "http 0.2.12", "httparse", "httpdate", "itoa", @@ -94,33 +95,34 @@ dependencies = [ [[package]] name = "actix-macros" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" +checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 1.0.95", + "syn 2.0.66", ] [[package]] name = "actix-router" -version = "0.5.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb60846b52c118f2f04a56cc90880a274271c489b2498623d58176f8ca21fa80" +checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", - "firestorm", - "http 0.2.7", - "log", + "cfg-if", + "http 0.2.12", "regex", + "regex-lite", "serde", + "tracing", ] [[package]] name = "actix-rt" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" +checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" dependencies = [ "futures-core", "tokio", @@ -128,9 +130,9 @@ dependencies = [ [[package]] name = "actix-server" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" +checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" dependencies = [ "actix-rt", "actix-service", @@ -138,8 +140,7 @@ dependencies = [ "futures-core", "futures-util", "mio", - "num_cpus", - "socket2 0.4.4", + "socket2 0.5.7", "tokio", "tracing", ] @@ -173,9 +174,9 @@ dependencies = [ [[package]] name = "actix-utils" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e491cbaac2e7fc788dfff99ff48ef317e23b3cf63dbaf7aaab6418f40f92aa94" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" dependencies = [ "local-waker", "pin-project-lite", @@ -183,9 +184,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.5.1" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a6556ddebb638c2358714d853257ed226ece6023ef9364f23f0c70737ea984" +checksum = "b1cf67dadb19d7c95e5a299e2dda24193b89d5d4f33a3b9800888ede9e19aa32" dependencies = [ "actix-codec", "actix-http", @@ -196,7 +197,7 @@ dependencies = [ "actix-service", "actix-utils", "actix-web-codegen", - "ahash 0.8.9", + "ahash", "bytes", "bytestring", "cfg-if", @@ -212,20 +213,21 @@ dependencies = [ "once_cell", "pin-project-lite", "regex", + "regex-lite", "serde", "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.5.6", + "socket2 0.5.7", "time", "url", ] [[package]] name = "actix-web-actors" -version = "4.1.0" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31efe7896f3933ce03dd4710be560254272334bb321a18fd8ff62b1a557d9d19" +checksum = "420b001bb709d8510c3e2659dae046e54509ff9528018d09c78381e765a1f9fa" dependencies = [ "actix", "actix-codec", @@ -236,6 +238,7 @@ dependencies = [ "futures-core", "pin-project-lite", "tokio", + "tokio-util", ] [[package]] @@ -247,7 +250,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] @@ -267,20 +270,20 @@ dependencies = [ [[package]] name = "actix_derive" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7" +checksum = "7c7db3d5a9718568e4cf4a537cfd7070e6e6ff7481510d0237fb529ac850f6d3" dependencies = [ "proc-macro2", "quote", - "syn 1.0.95", + "syn 2.0.66", ] [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -293,30 +296,30 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aead" -version = "0.4.3" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ + "crypto-common", "generic-array", ] [[package]] name = "aes" -version = "0.7.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", "cpufeatures", - "opaque-debug", ] [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -328,20 +331,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.9" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d713b3834d76b85304d4d525563c1276e2e30dc97cc67bfb4585a4a29fc2c89f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "getrandom", @@ -352,33 +344,33 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.18" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "alloc-no-stdlib" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ef4730490ad1c4eae5c4325b2a95f521d023e5c885853ff7aca0a6a1631db3" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] name = "alloc-stdlib" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697ed7edc0f1711de49ce108c541623a0af97c6c60b2f6e2b65229847ac843c2" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ "alloc-no-stdlib", ] [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -397,47 +389,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -445,9 +438,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.57" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f9b8508dccb7687a1d6c4ce66b2b0ecef467c94667de27d8d7fe1f8d2a9cdc" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "ascii_utils" @@ -457,34 +450,35 @@ checksum = "71938f30533e4d95a6d17aa530939da3842c2ab6f4f84b9dae68447e4129f74a" [[package]] name = "async-channel" -version = "1.6.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener-strategy", "futures-core", + "pin-project-lite", ] [[package]] name = "async-graphql" -version = "7.0.2" +version = "7.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ba89a35adbed833e0d21db467093a087c3a07b497626009eae02cb36f060567" +checksum = "bf338d20ba5bab309f55ce8df95d65ee19446f7737f06f4a64593ab2c6b546ad" dependencies = [ "async-graphql-derive", "async-graphql-parser", "async-graphql-value", "async-stream", "async-trait", - "base64 0.21.7", + "base64 0.22.1", "bytes", "chrono", "fast_chemail", "fnv", "futures-util", "handlebars", - "http 1.0.0", + "http 1.1.0", "indexmap", "mime", "multer", @@ -503,9 +497,9 @@ dependencies = [ [[package]] name = "async-graphql-actix-web" -version = "7.0.2" +version = "7.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46ba13d69a28f5f1f275a0a6a399c565b2af47249e61a48b759dd4d5d0f20fee" +checksum = "d50661e77b4c6c27ca018ad809d62fe40a02aa56b58fdc4eb333ceba56a024f1" dependencies = [ "actix", "actix-http", @@ -522,9 +516,9 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "7.0.2" +version = "7.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9547f7f22688f022ea8001bdd57a1fce8996045dcb959b1730a79bafd366a9d9" +checksum = "fc51fd6b7102acda72bc94e8ae1543844d5688ff394a6cf7c21f2a07fe2d64e4" dependencies = [ "Inflector", "async-graphql-parser", @@ -533,15 +527,15 @@ dependencies = [ "proc-macro2", "quote", "strum", - "syn 2.0.51", + "syn 2.0.66", "thiserror", ] [[package]] name = "async-graphql-parser" -version = "7.0.2" +version = "7.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8e3d4cc5074c46adfee619b5b6cf817943332f772ed5930ed78871f7dbbac6" +checksum = "75361eefd64e39f89bead4cb45fddbaf60ddb0e7b15fb7c852b6088bcd63071f" dependencies = [ "async-graphql-value", "pest", @@ -551,9 +545,9 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "7.0.2" +version = "7.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53ff1287a1283ea772b4099dd556ba4577d35f069ea4a93f337a525beefcfacf" +checksum = "c1f665d2d52b41c4ed1f01c43f3ef27a2fe0af2452ed5c8bc7ac9b1a8719afaa" dependencies = [ "bytes", "indexmap", @@ -563,34 +557,35 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", + "pin-project-lite", ] [[package]] name = "async-stream-impl" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 1.0.95", + "syn 2.0.66", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] @@ -602,21 +597,11 @@ dependencies = [ "num-traits", ] -[[package]] -name = "atomic-write-file" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edcdbedc2236483ab103a53415653d6b4442ea6141baf1ffa85df29635e88436" -dependencies = [ - "nix", - "rand", -] - [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backend" @@ -649,24 +634,24 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide 0.7.2", + "miniz_oxide", "object", "rustc-demangle", ] [[package]] name = "base64" -version = "0.13.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "0ea22880d78093b0cbe17c89f64a7d457941e65759157ec6cb31a31d652b05e5" [[package]] name = "base64" @@ -674,6 +659,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64ct" version = "1.6.0" @@ -688,27 +679,27 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] [[package]] name = "block-buffer" -version = "0.10.2" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ "generic-array", ] [[package]] name = "brotli" -version = "3.3.4" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -717,9 +708,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.2" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -727,47 +718,43 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.6.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.1.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" dependencies = [ "serde", ] [[package]] name = "bytestring" -version = "1.0.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90706ba19e97b90786e19dc0d5e2abd80008d99d4c0c5d1ad0b5e72cec7c494d" +checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" dependencies = [ "bytes", ] -[[package]] -name = "cache-padded" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" - [[package]] name = "cc" -version = "1.0.88" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" dependencies = [ + "jobserver", "libc", + "once_cell", ] [[package]] @@ -778,9 +765,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -788,29 +775,30 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.3", + "windows-targets 0.52.5", ] [[package]] name = "cipher" -version = "0.3.0" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "generic-array", + "crypto-common", + "inout", ] [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "combine" -version = "4.6.6" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "futures-core", @@ -822,11 +810,11 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "1.2.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "cache-padded", + "crossbeam-utils", ] [[package]] @@ -835,14 +823,20 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "cookie" -version = "0.16.0" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d4706de1b0fa5b132270cddffa8585166037822e260a944fe161acd137ca05" +checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" dependencies = [ "aes-gcm", - "base64 0.13.0", + "base64 0.20.0", "hkdf", "hmac", "percent-encoding", @@ -871,18 +865,18 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" -version = "0.2.2" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ "libc", ] [[package]] name = "crc" -version = "3.0.1" +version = "3.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" dependencies = [ "crc-catalog", ] @@ -895,67 +889,62 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-queue" -version = "0.3.5" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" +checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" -dependencies = [ - "cfg-if", - "lazy_static", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-common" -version = "0.1.3" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", + "rand_core", "typenum", ] [[package]] name = "ctr" -version = "0.8.0" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ "cipher", ] [[package]] name = "darling" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" dependencies = [ "darling_core", "darling_macro", @@ -963,49 +952,60 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + [[package]] name = "derive_more" -version = "0.99.11" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", - "syn 1.0.95", + "rustc_version", + "syn 1.0.109", ] [[package]] @@ -1028,18 +1028,18 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "either" -version = "1.6.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" dependencies = [ "serde", ] [[package]] name = "encoding_rs" -version = "0.8.28" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -1056,9 +1056,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c012a26a7f605efc424dd53697843a72be7dc86ad2d01f7814337794a12231d" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ "anstream", "anstyle", @@ -1075,9 +1075,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1096,9 +1096,30 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.2" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "5.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.3.1", + "pin-project-lite", +] [[package]] name = "fast_chemail" @@ -1111,26 +1132,18 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "firestorm" -version = "0.5.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3d6188b8804df28032815ea256b6955c9625c24da7525f387a7af02fbb8f01" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "flate2" -version = "1.0.20" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ - "cfg-if", "crc32fast", - "libc", - "miniz_oxide 0.4.4", + "miniz_oxide", ] [[package]] @@ -1152,11 +1165,10 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "matches", "percent-encoding", ] @@ -1227,7 +1239,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] @@ -1244,9 +1256,9 @@ checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-timer" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" [[package]] name = "futures-util" @@ -1268,9 +1280,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.4" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1278,9 +1290,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", @@ -1289,9 +1301,9 @@ dependencies = [ [[package]] name = "ghash" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" dependencies = [ "opaque-debug", "polyval", @@ -1299,22 +1311,22 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.7", + "http 0.2.12", "indexmap", "slab", "tokio", @@ -1324,9 +1336,9 @@ dependencies = [ [[package]] name = "handlebars" -version = "4.5.0" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa67bab9ff362228eb3d00bd024a4965d8231bbb7921167f0cfa66c6626b225" +checksum = "d08485b96a0e6393e9e4d1b8d48cf74ad6c063cd905eb33f42c1ce3f0377539b" dependencies = [ "log", "pest", @@ -1338,11 +1350,11 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.9", + "ahash", "allocator-api2", ] @@ -1364,14 +1376,17 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" -dependencies = [ - "libc", -] +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -1381,9 +1396,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac", ] @@ -1408,9 +1423,9 @@ dependencies = [ [[package]] name = "http" -version = "0.2.7" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8670570af52249509a86f5e3e18a08c60b177071826898fde8997cf5f6bfbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -1419,9 +1434,9 @@ dependencies = [ [[package]] name = "http" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -1430,12 +1445,12 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.7", + "http 0.2.12", "pin-project-lite", ] @@ -1447,9 +1462,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1459,22 +1474,22 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", "h2", - "http 0.2.7", + "http 0.2.12", "http-body", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.5.6", + "socket2 0.5.7", "tokio", "tower-service", "tracing", @@ -1488,7 +1503,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.7", + "http 0.2.12", "hyper", "rustls", "tokio", @@ -1526,31 +1541,45 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", "serde", ] +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + [[package]] name = "ipnet" -version = "2.3.0" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" [[package]] name = "itertools" @@ -1563,15 +1592,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +dependencies = [ + "libc", +] [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1593,9 +1631,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "libm" @@ -1616,33 +1654,32 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "local-channel" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" +checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" dependencies = [ "futures-core", "futures-sink", - "futures-util", "local-waker", ] [[package]] name = "local-waker" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" +checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1650,57 +1687,41 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "matches" -version = "0.1.8" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "md-5" -version = "0.10.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ + "cfg-if", "digest", ] [[package]] name = "memchr" -version = "2.4.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "metrics" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e52eb6380b6d2a10eb3434aec0885374490f5b82c8aaf5cd487a183c98be834" -dependencies = [ - "ahash 0.7.8", - "metrics-macros", -] - -[[package]] -name = "metrics-macros" -version = "0.5.1" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49e30813093f757be5cf21e50389a24dc7dbb22c49f23b7e8f51d69b508a5ffa" +checksum = "2be3cbd384d4e955b231c895ce10685e3d8260c5ccffae898c96c723b0772835" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.95", + "ahash", + "portable-atomic", ] [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "minimal-lexical" @@ -1710,28 +1731,18 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "miniz_oxide" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log", @@ -1741,9 +1752,9 @@ dependencies = [ [[package]] name = "mobc" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eb49dc5d193287ff80e72a86f34cfb27aae562299d22fea215e06ea1059dd3" +checksum = "d8d3681f0b299413df040f53c6950de82e48a8e1a9f79d442ed1ad3694d660b9" dependencies = [ "async-trait", "futures-channel", @@ -1770,38 +1781,26 @@ dependencies = [ [[package]] name = "multer" -version = "3.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15d522be0a9c3e46fd2632e272d178f56387bdb5c9fbb3a36c649062e9b5219" +checksum = "83e87776546dc87511aa5ee218730c92b666d7264ab6ed41f9d215af9cd5224b" dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.0.0", + "http 1.1.0", "httparse", - "log", "memchr", "mime", "spin 0.9.8", "version_check", ] -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "libc", -] - [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -1834,6 +1833,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.46" @@ -1845,9 +1850,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -1856,9 +1861,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", "libm", @@ -1866,28 +1871,19 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ "hermit-abi", "libc", ] -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - [[package]] name = "object" -version = "0.32.2" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" dependencies = [ "memchr", ] @@ -1900,9 +1896,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "overload" @@ -1910,11 +1906,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "parking" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" + [[package]] name = "parking_lot" -version = "0.12.0" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1922,22 +1924,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", - "windows-sys 0.36.1", + "windows-targets 0.52.5", ] [[package]] name = "paste" -version = "1.0.7" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pem-rfc7468" @@ -1950,15 +1952,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.7" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219c0dcc30b6a27553f9cc242972b67f75b60eb0db71f0b5462f38b058c41546" +checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", "thiserror", @@ -1967,9 +1969,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.7" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1288dbd7786462961e69bfd4df7848c1e37e8b74303dbdab82c3a9cdd2809" +checksum = "26293c9193fbca7b1a3bf9b79dc1e388e927e6cacaa78b4a3ab705a1d3d41459" dependencies = [ "pest", "pest_generator", @@ -1977,22 +1979,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.7" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1381c29a877c6d34b8c176e734f35d7f7f5b3adaefe940cb4d1bb7af94678e2e" +checksum = "3ec22af7d3fb470a85dd2ca96b7c577a1eb4ef6f1683a9fe9a8c16e136c04687" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] name = "pest_meta" -version = "2.7.7" +version = "2.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0934d6907f148c22a3acbda520c7eed243ad7487a30f51f6ce52b58b7077a8a" +checksum = "d7a240022f37c361ec1878d646fc5b7d7c4d28d5946e1a80ad5a7a4f4ca0bdcd" dependencies = [ "once_cell", "pest", @@ -2001,9 +2003,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -2040,9 +2042,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "polyval" -version = "0.5.3" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" dependencies = [ "cfg-if", "cpufeatures", @@ -2050,36 +2052,47 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "portable-atomic" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "proc-macro-crate" -version = "1.0.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fdbd1df62156fbc5945f4762632564d7d038153091c3fcf1067f6aef7cff92" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "thiserror", - "toml", + "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -2097,9 +2110,9 @@ dependencies = [ [[package]] name = "rand_chacha" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", "rand_core", @@ -2129,7 +2142,7 @@ dependencies = [ "pin-project-lite", "ryu", "sha1_smol", - "socket2 0.4.4", + "socket2 0.4.10", "tokio", "tokio-util", "url", @@ -2137,35 +2150,62 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", +] + [[package]] name = "regex" -version = "1.5.5" +version = "1.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" + [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", @@ -2173,7 +2213,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http 0.2.7", + "http 0.2.12", "http-body", "hyper", "hyper-rustls", @@ -2202,21 +2242,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.8" @@ -2228,7 +2253,7 @@ dependencies = [ "getrandom", "libc", "spin 0.9.8", - "untrusted 0.9.0", + "untrusted", "windows-sys 0.52.0", ] @@ -2254,17 +2279,26 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -2273,12 +2307,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.8", + "ring", "rustls-webpki", "sct", ] @@ -2298,63 +2332,69 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", + "ring", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", + "ring", + "untrusted", ] +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + [[package]] name = "serde" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa", "ryu", @@ -2375,9 +2415,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.4" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -2392,9 +2432,9 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "sha2" -version = "0.10.2" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -2412,9 +2452,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.3.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -2440,15 +2480,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" dependencies = [ "libc", "winapi", @@ -2456,9 +2496,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.6" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2502,9 +2542,9 @@ dependencies = [ [[package]] name = "sqlx" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba03c279da73694ef99763320dea58b51095dfe87d001b1d4b5fe78ba8763cf" +checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" dependencies = [ "sqlx-core", "sqlx-macros", @@ -2515,20 +2555,19 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d84b0a3c3739e220d94b3239fd69fb1f74bc36e16643423bd99de3b43c21bfbd" +checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" dependencies = [ - "ahash 0.8.9", + "ahash", "atoi", "byteorder", "bytes", "chrono", "crc", "crossbeam-queue", - "dotenvy", "either", - "event-listener", + "event-listener 2.5.3", "futures-channel", "futures-core", "futures-intrusive", @@ -2560,27 +2599,26 @@ dependencies = [ [[package]] name = "sqlx-macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89961c00dc4d7dffb7aee214964b065072bff69e36ddb9e2c107541f75e4f2a5" +checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 1.0.95", + "syn 1.0.109", ] [[package]] name = "sqlx-macros-core" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0bd4519486723648186a08785143599760f7cc81c52334a55d6a83ea1e20841" +checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" dependencies = [ - "atomic-write-file", "dotenvy", "either", - "heck", + "heck 0.4.1", "hex", "once_cell", "proc-macro2", @@ -2592,7 +2630,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 1.0.95", + "syn 1.0.109", "tempfile", "tokio", "url", @@ -2600,13 +2638,13 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e37195395df71fd068f6e2082247891bc11e3289624bbc776a0cdfa1ca7f1ea4" +checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" dependencies = [ "atoi", "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "bytes", "chrono", @@ -2644,13 +2682,13 @@ dependencies = [ [[package]] name = "sqlx-postgres" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ac0ac3b7ccd10cc96c7ab29791a7dd236bd94021f31eec7ba3d46a74aa1c24" +checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" dependencies = [ "atoi", "base64 0.21.7", - "bitflags 2.4.2", + "bitflags 2.5.0", "byteorder", "chrono", "crc", @@ -2672,7 +2710,6 @@ dependencies = [ "rand", "serde", "serde_json", - "sha1", "sha2", "smallvec", "sqlx-core", @@ -2685,9 +2722,9 @@ dependencies = [ [[package]] name = "sqlx-sqlite" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "210976b7d948c7ba9fced8ca835b11cbb2d677c59c79de41ac0d397e14547490" +checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" dependencies = [ "atoi", "chrono", @@ -2716,53 +2753,54 @@ checksum = "d7beae5182595e9a8b683fa98c4317f956c9a2dec3b9716990d20023cc60c766" [[package]] name = "stringprep" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" dependencies = [ "unicode-bidi", "unicode-normalization", + "unicode-properties", ] [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] name = "subtle" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "1.0.95" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -2771,9 +2809,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.51" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -2821,22 +2859,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] @@ -2851,42 +2889,55 @@ dependencies = [ [[package]] name = "time" -version = "0.3.9" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ + "deranged", "itoa", - "libc", - "num_threads", + "num-conv", + "powerfmt", + "serde", + "time-core", "time-macros", ] +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + [[package]] name = "time-macros" -version = "0.2.4" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42657b1a6f4d817cda8e7a0ace261fe0cc946cf3a80314390b22cc61ae080792" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] [[package]] name = "tinyvec" -version = "1.1.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" dependencies = [ "backtrace", "bytes", @@ -2896,20 +2947,20 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.5.7", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] @@ -2924,9 +2975,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.8" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -2935,32 +2986,39 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.2" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] -name = "toml" -version = "0.5.8" +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" + +[[package]] +name = "toml_edit" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "serde", + "indexmap", + "toml_datetime", + "winnow", ] [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" @@ -2982,7 +3040,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] @@ -3022,15 +3080,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.15.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -3040,33 +3098,36 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.17" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-properties" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" + [[package]] name = "unicode-segmentation" -version = "1.7.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode_categories" @@ -3076,20 +3137,14 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "generic-array", + "crypto-common", "subtle", ] -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -3098,13 +3153,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.2.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] @@ -3116,15 +3170,15 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", "serde", @@ -3150,11 +3204,10 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -3164,11 +3217,17 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3176,24 +3235,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.21" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e67a5806118af01f0d9045915676b22aaebecf4178ae7021bc171dab0b897ab" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3203,9 +3262,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3213,28 +3272,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.48" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -3248,12 +3307,12 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "whoami" -version = "1.2.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8" +checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" dependencies = [ - "wasm-bindgen", - "web-sys", + "redox_syscall 0.4.1", + "wasite", ] [[package]] @@ -3284,20 +3343,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.3", -] - -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.52.5", ] [[package]] @@ -3315,7 +3361,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.3", + "windows-targets 0.52.5", ] [[package]] @@ -3335,17 +3381,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.52.3", - "windows_aarch64_msvc 0.52.3", - "windows_i686_gnu 0.52.3", - "windows_i686_msvc 0.52.3", - "windows_x86_64_gnu 0.52.3", - "windows_x86_64_gnullvm 0.52.3", - "windows_x86_64_msvc 0.52.3", + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", ] [[package]] @@ -3356,15 +3403,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" @@ -3374,15 +3415,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" @@ -3392,15 +3427,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] -name = "windows_i686_msvc" -version = "0.36.1" +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" @@ -3410,15 +3445,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" @@ -3428,9 +3457,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" @@ -3440,27 +3469,30 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.3" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] -name = "windows_x86_64_msvc" -version = "0.52.3" +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] [[package]] name = "winreg" @@ -3474,53 +3506,53 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.51", + "syn 2.0.66", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" [[package]] name = "zstd" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" +checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" dependencies = [ "zstd-safe", ] [[package]] name = "zstd-safe" -version = "7.0.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" +checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/backend/src/bin/server.rs b/backend/src/bin/server.rs index 7e9a465..fa694e3 100644 --- a/backend/src/bin/server.rs +++ b/backend/src/bin/server.rs @@ -97,10 +97,9 @@ async fn main() -> HubbitResult<()> { App::new() .wrap(middleware::Logger::default()) .wrap( - // CookieSession::private(cookie_secret.as_bytes()).secure(cookie_secure) SessionMiddleware::builder(CookieSessionStore::default(), cookie_secret.clone()) .cookie_http_only(true) - .cookie_same_site(SameSite::Strict) + .cookie_same_site(SameSite::Lax) .cookie_secure(cookie_secure) .build(), ) diff --git a/backend/src/handlers/auth.rs b/backend/src/handlers/auth.rs index 26f03b6..684f01d 100644 --- a/backend/src/handlers/auth.rs +++ b/backend/src/handlers/auth.rs @@ -57,8 +57,11 @@ async fn gamma_init_flow( } } + let scope = "openid%20profile"; + let redirect_uri = "http://localhost:3000/api/auth/gamma/callback"; + let url = format!( - "{}/api/oauth/authorize?response_type=code&client_id={}&state={}", + "{}/oauth2/authorize?response_type=code&client_id={}&state={}&scope={scope}&redirect_uri={redirect_uri}", config.gamma_public_url, config.gamma_client_id, state ); HttpResponse::TemporaryRedirect() @@ -92,8 +95,8 @@ async fn gamma_callback( let token_response = match crate::utils::gamma::oauth2_token(&config, &query.code).await { Ok(token_response) => token_response, - Err(_) => { - error!("[Gamma auth] Could not get gamma access token"); + Err(err) => { + error!("[Gamma auth] Could not get gamma access token, err {err:?}"); return HttpResponse::BadRequest().finish(); } }; diff --git a/backend/src/utils/gamma.rs b/backend/src/utils/gamma.rs index 4588c4f..0b92af0 100644 --- a/backend/src/utils/gamma.rs +++ b/backend/src/utils/gamma.rs @@ -1,5 +1,5 @@ use reqwest::Client; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; use crate::{config::Config, error::HubbitResult, models::GammaUser}; @@ -8,25 +8,43 @@ pub struct GammaTokenResponse { pub access_token: String, } +#[derive(Debug, Serialize)] +struct GammaTokenRequest { + client_id: String, + client_secret: String, + code: String, + redirect_uri: String, + grant_type: String, +} + pub async fn oauth2_token(config: &Config, code: &str) -> HubbitResult { let client = Client::new(); - let url = format!( - "{}/api/oauth/token?grant_type=authorization_code&code={}", - config.gamma_internal_url, code - ); + + let redirect_uri = "http://localhost:3000/api/auth/gamma/callback"; + + let url = format!("{}/oauth2/token", config.gamma_internal_url); + let body_str = client .post(&url) - .basic_auth(&config.gamma_client_id, Some(&config.gamma_client_secret)) + .form(&GammaTokenRequest { + client_id: config.gamma_client_id.clone(), + client_secret: config.gamma_client_secret.clone(), + code: code.into(), + redirect_uri: redirect_uri.into(), + grant_type: "authorization_code".into(), + }) + .header("accept", "application/json") .send() .await? .text() .await?; + Ok(serde_json::from_str(&body_str)?) } pub async fn get_current_user(config: &Config, access_token: &str) -> HubbitResult { let client = Client::new(); - let url = format!("{}/api/users/me", config.gamma_internal_url); + let url = format!("{}/oauth2/userinfo", config.gamma_internal_url); let body_str = client .get(&url) .bearer_auth(access_token) @@ -34,5 +52,6 @@ pub async fn get_current_user(config: &Config, access_token: &str) -> HubbitResu .await? .text() .await?; + Ok(serde_json::from_str(&body_str)?) } From c4130174bf712691e7b943be323602212fd452f3 Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sat, 8 Jun 2024 15:32:03 +0200 Subject: [PATCH 02/13] Add TODos --- backend/src/handlers/auth.rs | 1 + backend/src/utils/gamma.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/src/handlers/auth.rs b/backend/src/handlers/auth.rs index 684f01d..c03415d 100644 --- a/backend/src/handlers/auth.rs +++ b/backend/src/handlers/auth.rs @@ -57,6 +57,7 @@ async fn gamma_init_flow( } } + // TODO: these should be config params let scope = "openid%20profile"; let redirect_uri = "http://localhost:3000/api/auth/gamma/callback"; diff --git a/backend/src/utils/gamma.rs b/backend/src/utils/gamma.rs index 0b92af0..7b18141 100644 --- a/backend/src/utils/gamma.rs +++ b/backend/src/utils/gamma.rs @@ -20,6 +20,7 @@ struct GammaTokenRequest { pub async fn oauth2_token(config: &Config, code: &str) -> HubbitResult { let client = Client::new(); + // TODO: THis should be a config param let redirect_uri = "http://localhost:3000/api/auth/gamma/callback"; let url = format!("{}/oauth2/token", config.gamma_internal_url); From ac28324390dbf628d8a445640f46edef755f80bb Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Wed, 19 Jun 2024 00:36:39 +0200 Subject: [PATCH 03/13] Keep working it --- backend/.env.example | 1 + backend/src/config.rs | 2 + backend/src/handlers/auth.rs | 6 +-- backend/src/models.rs | 42 ++++++++++++---- backend/src/utils/gamma.rs | 5 +- docker-compose.yml | 92 +++++++++++++++++++----------------- 6 files changed, 89 insertions(+), 59 deletions(-) diff --git a/backend/.env.example b/backend/.env.example index e1a8a8e..a0749d5 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -7,6 +7,7 @@ GAMMA_INTERNAL_URL=http://localhost:8081 GAMMA_API_KEY=hubbit GAMMA_CLIENT_ID=hubbit GAMMA_CLIENT_SECRET=hubbit +GAMMA_REDIRECT_URI=http://localhost:3000/api/auth/gamma/callback COOKIE_SECRET=bdvrJ2cYgPeaj6Tys5475QHoj7Qcenb2bdvrJ2cYgPeaj6Tys5475QHoj7Qcenb2 COOKIE_SECURE=false diff --git a/backend/src/config.rs b/backend/src/config.rs index 6024a38..4571c29 100644 --- a/backend/src/config.rs +++ b/backend/src/config.rs @@ -10,6 +10,7 @@ pub struct Config { pub gamma_api_key: String, pub gamma_client_id: String, pub gamma_client_secret: String, + pub gamma_redirect_uri: String, pub cookie_secret: String, pub cookie_secure: bool, pub group_whitelist: Vec, @@ -26,6 +27,7 @@ impl Config { gamma_api_key: try_read_var("GAMMA_API_KEY")?, gamma_client_id: try_read_var("GAMMA_CLIENT_ID")?, gamma_client_secret: try_read_var("GAMMA_CLIENT_SECRET")?, + gamma_redirect_uri: try_read_var("GAMMA_REIDRECT_URI")?, cookie_secret: try_read_var("COOKIE_SECRET")?, cookie_secure: try_read_var("COOKIE_SECURE")?, group_whitelist: try_read_var::("GROUP_WHITELIST") diff --git a/backend/src/handlers/auth.rs b/backend/src/handlers/auth.rs index c03415d..6ee9dd5 100644 --- a/backend/src/handlers/auth.rs +++ b/backend/src/handlers/auth.rs @@ -57,13 +57,11 @@ async fn gamma_init_flow( } } - // TODO: these should be config params let scope = "openid%20profile"; - let redirect_uri = "http://localhost:3000/api/auth/gamma/callback"; let url = format!( - "{}/oauth2/authorize?response_type=code&client_id={}&state={}&scope={scope}&redirect_uri={redirect_uri}", - config.gamma_public_url, config.gamma_client_id, state + "{}/oauth2/authorize?response_type=code&client_id={}&state={}&scope={scope}&redirect_uri={}", + config.gamma_public_url, config.gamma_client_id, state, config.gamma_redirect_uri ); HttpResponse::TemporaryRedirect() .append_header(("Location", url)) diff --git a/backend/src/models.rs b/backend/src/models.rs index 03f757c..6988bd7 100644 --- a/backend/src/models.rs +++ b/backend/src/models.rs @@ -99,29 +99,55 @@ impl From for i32 { #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GammaUser { + #[serde(rename = "sub")] pub id: Uuid, pub cid: String, + #[serde(rename = "nickname")] pub nick: String, - #[serde(rename = "firstName")] + #[serde(rename = "given_name")] pub first_name: String, - #[serde(rename = "lastName")] + #[serde(rename = "family_name")] pub last_name: String, - #[serde(rename = "avatarUrl")] + #[serde(rename = "picture")] pub avatar_url: String, - pub groups: Vec, } #[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] pub struct GammaGroup { - pub active: bool, - #[serde(rename = "superGroup")] + pub id: Uuid, + pub name: String, + pub pretty_name: String, pub super_group: GammaSuperGroup, + pub post: GammaGroupPost, } -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Debug, Clone, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] pub struct GammaSuperGroup { pub id: Uuid, pub name: String, - #[serde(rename = "prettyName")] pub pretty_name: String, + #[serde(rename = "type")] + pub group_type: GammaGroupType, + pub sv_description: String, + pub en_description: String, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +#[serde(rename = "camelCase")] +pub enum GammaGroupType { + Society, + Functionaries, + Committee, + Alumni, +} + +#[derive(Debug, Clone, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct GammaGroupPost { + pub id: Uuid, + pub version: u32, + pub sv_name: String, + pub en_name: String, } diff --git a/backend/src/utils/gamma.rs b/backend/src/utils/gamma.rs index 7b18141..0639652 100644 --- a/backend/src/utils/gamma.rs +++ b/backend/src/utils/gamma.rs @@ -20,9 +20,6 @@ struct GammaTokenRequest { pub async fn oauth2_token(config: &Config, code: &str) -> HubbitResult { let client = Client::new(); - // TODO: THis should be a config param - let redirect_uri = "http://localhost:3000/api/auth/gamma/callback"; - let url = format!("{}/oauth2/token", config.gamma_internal_url); let body_str = client @@ -31,7 +28,7 @@ pub async fn oauth2_token(config: &Config, code: &str) -> HubbitResult Date: Sun, 23 Jun 2024 01:43:32 +0200 Subject: [PATCH 04/13] Implement updated auth --- backend/.env.example | 3 +- backend/Cargo.lock | 444 +++++++++++++++++++++++++++++-- backend/Cargo.toml | 1 + backend/src/config.rs | 23 +- backend/src/error.rs | 3 + backend/src/handlers/auth.rs | 65 +++-- backend/src/handlers/graphql.rs | 14 +- backend/src/models.rs | 90 ++++++- backend/src/repositories/user.rs | 64 +++-- backend/src/schema/device.rs | 28 +- backend/src/schema/me.rs | 6 +- backend/src/schema/mod.rs | 4 +- backend/src/schema/user.rs | 28 +- backend/src/services/user.rs | 48 +++- backend/src/utils/gamma.rs | 55 ---- backend/src/utils/mod.rs | 2 - frontend/schema.gql | 186 ++++++------- 17 files changed, 774 insertions(+), 290 deletions(-) delete mode 100644 backend/src/utils/gamma.rs diff --git a/backend/.env.example b/backend/.env.example index a0749d5..8281540 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -2,8 +2,7 @@ PORT=8080 DATABASE_URL=postgres://hubbit:hubbit@localhost/hubbit REDIS_URL=redis://127.0.0.1:6379 -GAMMA_PUBLIC_URL=http://localhost:8081 -GAMMA_INTERNAL_URL=http://localhost:8081 +GAMMA_URL=http://localhost:8081 GAMMA_API_KEY=hubbit GAMMA_CLIENT_ID=hubbit GAMMA_CLIENT_SECRET=hubbit diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 2ee38a3..ff83316 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -74,7 +74,7 @@ dependencies = [ "encoding_rs", "flate2", "futures-core", - "h2", + "h2 0.3.26", "http 0.2.12", "httparse", "httpdate", @@ -597,6 +597,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.3.0" @@ -616,13 +622,14 @@ dependencies = [ "dotenvy", "env_logger", "futures", + "gamma_rust_client", "lazy_static", "log", "mobc", "mobc-redis", "once_cell", "rand", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", "slab", @@ -1163,6 +1170,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -1278,6 +1300,19 @@ dependencies = [ "slab", ] +[[package]] +name = "gamma_rust_client" +version = "0.1.0" +source = "git+https://github.com/viddem/gamma.git?rev=1235842562c9f3b50a68582dea13f66fbe93cf5e#1235842562c9f3b50a68582dea13f66fbe93cf5e" +dependencies = [ + "rand", + "reqwest 0.12.5", + "serde", + "thiserror", + "urlencoding", + "uuid", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -1334,6 +1369,25 @@ dependencies = [ "tracing", ] +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "handlebars" version = "5.1.2" @@ -1454,6 +1508,29 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] + [[package]] name = "httparse" version = "1.8.0" @@ -1482,9 +1559,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", - "http-body", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -1496,6 +1573,26 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -1504,10 +1601,63 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper", - "rustls", + "hyper 0.14.29", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.3.1", + "hyper-util", + "rustls 0.23.10", + "rustls-pki-types", + "tokio", + "tokio-rustls 0.26.0", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.3.1", + "hyper-util", + "native-tls", "tokio", - "tokio-rustls", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.3.1", + "pin-project-lite", + "socket2 0.5.7", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -1796,6 +1946,23 @@ dependencies = [ "version_check", ] +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "nom" version = "7.1.3" @@ -1900,6 +2067,50 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "overload" version = "0.1.1" @@ -2001,6 +2212,26 @@ dependencies = [ "sha2", ] +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.66", +] + [[package]] name = "pin-project-lite" version = "0.2.14" @@ -2212,11 +2443,11 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", - "http-body", - "hyper", - "hyper-rustls", + "http-body 0.4.6", + "hyper 0.14.29", + "hyper-rustls 0.24.2", "ipnet", "js-sys", "log", @@ -2224,22 +2455,65 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "webpki-roots", - "winreg", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.3.1", + "hyper-rustls 0.27.2", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.1.2", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.52.0", ] [[package]] @@ -2313,10 +2587,23 @@ checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.102.4", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -2326,6 +2613,22 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -2336,6 +2639,17 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.17" @@ -2348,6 +2662,15 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -2364,6 +2687,29 @@ dependencies = [ "untrusted", ] +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "semver" version = "1.0.23" @@ -2581,8 +2927,8 @@ dependencies = [ "once_cell", "paste", "percent-encoding", - "rustls", - "rustls-pemfile", + "rustls 0.21.12", + "rustls-pemfile 1.0.4", "serde", "serde_json", "sha2", @@ -2824,6 +3170,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "system-configuration" version = "0.5.1" @@ -2963,13 +3315,34 @@ dependencies = [ "syn 2.0.66", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.10", + "rustls-pki-types", "tokio", ] @@ -3014,6 +3387,27 @@ dependencies = [ "winnow", ] +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -3504,6 +3898,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "zerocopy" version = "0.7.34" diff --git a/backend/Cargo.toml b/backend/Cargo.toml index a4f02e0..8b39c8f 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -43,3 +43,4 @@ tokio = { version = "1.36.0", features = [ "time", ] } uuid = { version = "1.7.0", features = ["serde"] } +gamma_rust_client = { git = "https://github.com/viddem/gamma.git", rev = "1235842562c9f3b50a68582dea13f66fbe93cf5e" } diff --git a/backend/src/config.rs b/backend/src/config.rs index 4571c29..e5d03f6 100644 --- a/backend/src/config.rs +++ b/backend/src/config.rs @@ -1,19 +1,16 @@ use std::{env, str::FromStr}; +use gamma_rust_client::config::GammaConfig; + #[derive(Clone, Debug)] pub struct Config { pub port: u16, pub db_url: String, pub redis_url: String, - pub gamma_public_url: String, - pub gamma_internal_url: String, - pub gamma_api_key: String, - pub gamma_client_id: String, - pub gamma_client_secret: String, - pub gamma_redirect_uri: String, pub cookie_secret: String, pub cookie_secure: bool, pub group_whitelist: Vec, + pub gamma_config: GammaConfig, } impl Config { @@ -22,12 +19,6 @@ impl Config { port: try_read_var("PORT")?, db_url: try_read_var("DATABASE_URL")?, redis_url: try_read_var("REDIS_URL")?, - gamma_public_url: try_read_var("GAMMA_PUBLIC_URL")?, - gamma_internal_url: try_read_var("GAMMA_INTERNAL_URL")?, - gamma_api_key: try_read_var("GAMMA_API_KEY")?, - gamma_client_id: try_read_var("GAMMA_CLIENT_ID")?, - gamma_client_secret: try_read_var("GAMMA_CLIENT_SECRET")?, - gamma_redirect_uri: try_read_var("GAMMA_REIDRECT_URI")?, cookie_secret: try_read_var("COOKIE_SECRET")?, cookie_secure: try_read_var("COOKIE_SECURE")?, group_whitelist: try_read_var::("GROUP_WHITELIST") @@ -36,6 +27,14 @@ impl Config { .map(|str| str.trim().to_string()) .filter(|str| !str.is_empty()) .collect(), + gamma_config: GammaConfig { + gamma_client_id: try_read_var("GAMMA_CLIENT_ID")?, + gamma_client_secret: try_read_var("GAMMA_CLIENT_SECRET")?, + gamma_redirect_uri: try_read_var("GAMMA_REDIRECT_URI")?, + gamma_url: try_read_var("GAMMA_URL")?, // TODO Probably update this name + scopes: "openid profile".into(), + gamma_api_key: try_read_var("GAMMA_API_KEY")?, + }, }; if conf.group_whitelist.is_empty() { diff --git a/backend/src/error.rs b/backend/src/error.rs index 3425be4..a626568 100644 --- a/backend/src/error.rs +++ b/backend/src/error.rs @@ -1,4 +1,5 @@ use actix_web::ResponseError; +use gamma_rust_client::error::GammaError; #[derive(Debug, thiserror::Error)] pub enum HubbitError { @@ -16,6 +17,8 @@ pub enum HubbitError { SqlxError(#[from] sqlx::Error), #[error("Io error")] IoError(#[from] std::io::Error), + #[error("Gamma error")] + GammaError(#[from] GammaError), #[error("Entity not found")] NotFound, } diff --git a/backend/src/handlers/auth.rs b/backend/src/handlers/auth.rs index 6ee9dd5..738cd0c 100644 --- a/backend/src/handlers/auth.rs +++ b/backend/src/handlers/auth.rs @@ -3,8 +3,8 @@ use actix_web::{ web::{self, ServiceConfig}, HttpResponse, }; +use gamma_rust_client::oauth::{GammaAccessToken, GammaState}; use log::{error, warn}; -use rand::{distributions::Alphanumeric, thread_rng, Rng}; use serde::{Deserialize, Serialize}; use crate::config::Config; @@ -19,11 +19,12 @@ async fn gamma_init_flow( session: Session, query: web::Query, ) -> HttpResponse { - if let Ok(Some(access_token)) = session.get::("gamma_access_token") { - if crate::utils::gamma::get_current_user(&config, &access_token) - .await - .is_ok() - { + if let Ok(Some(access_token)) = session.get::("gamma_access_token") { + if let Err(err) = access_token.get_current_user(&config.gamma_config).await { + warn!("[Gamma auth flow] Failed to get current user with the access token, err: {err:?}"); + session.remove("gamma_access_token"); + } else { + // The user is already authenticated. let url = query.from.clone().unwrap_or_else(|| "/".to_string()); return HttpResponse::TemporaryRedirect() .append_header(("Location", url)) @@ -31,12 +32,15 @@ async fn gamma_init_flow( } }; - let state: String = thread_rng() - .sample_iter(&Alphanumeric) - .take(32) - .map(char::from) - .collect(); - match session.insert("gamma_state", &state) { + let gamma_init = match gamma_rust_client::oauth::gamma_init_auth(&config.gamma_config) { + Ok(init) => init, + Err(err) => { + error!("[Gamma auth] Could not setup gamma auth initialization, err: {err:?}"); + return HttpResponse::InternalServerError().finish(); + } + }; + + match session.insert("gamma_state", gamma_init.state) { Ok(_) => {} Err(_) => { error!("[Gamma auth] Could not set gamma_state key in cookie"); @@ -57,14 +61,8 @@ async fn gamma_init_flow( } } - let scope = "openid%20profile"; - - let url = format!( - "{}/oauth2/authorize?response_type=code&client_id={}&state={}&scope={scope}&redirect_uri={}", - config.gamma_public_url, config.gamma_client_id, state, config.gamma_redirect_uri - ); HttpResponse::TemporaryRedirect() - .append_header(("Location", url)) + .append_header(("Location", gamma_init.redirect_to)) .finish() } @@ -79,7 +77,7 @@ async fn gamma_callback( session: Session, query: web::Query, ) -> HttpResponse { - let saved_state = match session.get::("gamma_state") { + let saved_state = match session.get::("gamma_state") { Ok(Some(saved_state)) => saved_state, _ => { warn!("[Gamma auth] Could not retrieve gamma_state"); @@ -87,25 +85,24 @@ async fn gamma_callback( } }; - if query.state != saved_state { - warn!("[Gamma auth] State mismatch"); - return HttpResponse::BadRequest().finish(); - } - - let token_response = match crate::utils::gamma::oauth2_token(&config, &query.code).await { - Ok(token_response) => token_response, + let token = match saved_state + .gamma_callback_params( + &config.gamma_config, + query.state.clone(), + query.code.clone(), + ) + .await + { + Ok(t) => t, Err(err) => { - error!("[Gamma auth] Could not get gamma access token, err {err:?}"); + error!("[Gamma auth] Failed to exchange code for auth token, err: {err:?}"); return HttpResponse::BadRequest().finish(); } }; - match session.insert("gamma_access_token", token_response.access_token) { - Ok(_) => {} - Err(_) => { - error!("[Gamma auth] Could not set gamma_acess_token key in cookie"); - return HttpResponse::InternalServerError().finish(); - } + if let Err(_) = session.insert("gamma_access_token", token) { + error!("[Gamma auth] Could not set gamma_acess_token key in cookie"); + return HttpResponse::InternalServerError().finish(); } let from = match session.get::("gamma_from") { diff --git a/backend/src/handlers/graphql.rs b/backend/src/handlers/graphql.rs index 51e01b1..e9819d3 100644 --- a/backend/src/handlers/graphql.rs +++ b/backend/src/handlers/graphql.rs @@ -6,8 +6,9 @@ use actix_web::{ }; use async_graphql::http::{playground_source, GraphQLPlaygroundConfig}; use async_graphql_actix_web::{GraphQLRequest, GraphQLResponse, GraphQLSubscription}; +use gamma_rust_client::oauth::GammaAccessToken; -use crate::{config::Config, schema::HubbitSchema}; +use crate::{config::Config, models::AuthorizedUser, schema::HubbitSchema}; async fn playground() -> Result { Ok( @@ -26,9 +27,9 @@ async fn graphql( config: web::Data, ) -> GraphQLResponse { let mut request = gql_request.into_inner(); - if let Ok(Some(access_token)) = session.get::("gamma_access_token") { - if let Ok(user) = crate::utils::gamma::get_current_user(&config, &access_token).await { - request = request.data(user); + if let Ok(Some(access_token)) = session.get::("gamma_access_token") { + if let Ok(user) = access_token.get_current_user(&config.gamma_config).await { + request = request.data(AuthorizedUser::from(user)); } }; @@ -43,8 +44,9 @@ async fn graphql_ws( payload: web::Payload, ) -> Result { let mut authenticated = false; - if let Ok(Some(access_token)) = session.get::("gamma_access_token") { - if crate::utils::gamma::get_current_user(&config, &access_token) + if let Ok(Some(access_token)) = session.get::("gamma_access_token") { + if access_token + .get_current_user(&config.gamma_config) .await .is_ok() { diff --git a/backend/src/models.rs b/backend/src/models.rs index 6988bd7..49dc14a 100644 --- a/backend/src/models.rs +++ b/backend/src/models.rs @@ -99,17 +99,41 @@ impl From for i32 { #[derive(Clone, Debug, Deserialize, Serialize)] pub struct GammaUser { - #[serde(rename = "sub")] pub id: Uuid, pub cid: String, - #[serde(rename = "nickname")] pub nick: String, - #[serde(rename = "given_name")] pub first_name: String, - #[serde(rename = "family_name")] pub last_name: String, - #[serde(rename = "picture")] - pub avatar_url: String, + pub groups: Vec, +} + +impl GammaUser { + pub fn from_user_and_groups( + user: gamma_rust_client::api::GammaUser, + groups: Vec, + ) -> Self { + Self { + id: user.id, + cid: user.cid, + nick: user.nick, + first_name: user.first_name, + last_name: user.last_name, + groups: groups.into_iter().map(|g| g.into()).collect(), + } + } +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct AuthorizedUser { + pub user_id: Uuid, +} + +impl From for AuthorizedUser { + fn from(value: gamma_rust_client::oauth::GammaOpenIDUser) -> Self { + Self { + user_id: value.user_id, + } + } } #[derive(Clone, Debug, Deserialize, Serialize)] @@ -122,6 +146,18 @@ pub struct GammaGroup { pub post: GammaGroupPost, } +impl From for GammaGroup { + fn from(value: gamma_rust_client::api::GammaUserGroup) -> Self { + Self { + id: value.id, + name: value.name, + pretty_name: value.pretty_name, + super_group: value.super_group.into(), + post: value.post.into(), + } + } +} + #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct GammaSuperGroup { @@ -134,20 +170,58 @@ pub struct GammaSuperGroup { pub en_description: String, } -#[derive(Debug, Clone, Deserialize, Serialize)] +impl From for GammaSuperGroup { + fn from(value: gamma_rust_client::api::GammaSuperGroup) -> Self { + Self { + id: value.id, + name: value.name, + pretty_name: value.pretty_name, + group_type: value.group_type.into(), + sv_description: value.sv_description, + en_description: value.en_description, + } + } +} + +#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)] #[serde(rename = "camelCase")] pub enum GammaGroupType { Society, Functionaries, Committee, Alumni, + Other(String), +} + +impl From for GammaGroupType { + fn from(value: gamma_rust_client::api::GammaSuperGroupType) -> Self { + match value { + gamma_rust_client::api::GammaSuperGroupType::Alumni => Self::Alumni, + gamma_rust_client::api::GammaSuperGroupType::Committee => Self::Committee, + gamma_rust_client::api::GammaSuperGroupType::Society => Self::Society, + gamma_rust_client::api::GammaSuperGroupType::Functionaries => Self::Functionaries, + gamma_rust_client::api::GammaSuperGroupType::Admin => Self::Other("Admin".into()), + gamma_rust_client::api::GammaSuperGroupType::Other(v) => Self::Other(v), + } + } } #[derive(Debug, Clone, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] pub struct GammaGroupPost { pub id: Uuid, - pub version: u32, + pub version: i32, pub sv_name: String, pub en_name: String, } + +impl From for GammaGroupPost { + fn from(value: gamma_rust_client::api::GammaPost) -> Self { + Self { + id: value.id, + version: value.version, + sv_name: value.sv_name, + en_name: value.en_name, + } + } +} diff --git a/backend/src/repositories/user.rs b/backend/src/repositories/user.rs index 6c33fe8..05d7a00 100644 --- a/backend/src/repositories/user.rs +++ b/backend/src/repositories/user.rs @@ -1,4 +1,5 @@ -use reqwest::{header::AUTHORIZATION, Client}; +use gamma_rust_client::{api::GammaClient, error::GammaError}; +use uuid::Uuid; use crate::{ config::Config, @@ -8,32 +9,55 @@ use crate::{ #[derive(Clone)] pub struct UserRepository { - config: Config, + gamma_client: GammaClient, } impl UserRepository { pub fn new(config: Config) -> Self { - Self { config } + let gamma_client = GammaClient::new(&config.gamma_config); + Self { gamma_client } } - pub async fn get(&self, id: String) -> HubbitResult { - let client = Client::new(); - let res = client - .get(&format!( - "{}/api/users/{}", - self.config.gamma_internal_url, id - )) - .header( - AUTHORIZATION, - format!("pre-shared {}", self.config.gamma_api_key), - ) - .send() - .await?; - if res.status() == 404 { - return Err(HubbitError::NotFound); + pub async fn get(&self, id: &Uuid) -> HubbitResult { + let user = self.gamma_client.get_user(id).await.map_err(|err| { + if matches!(err, GammaError::NotFoundResponse { .. }) { + return HubbitError::NotFound; + } + + HubbitError::GammaError(err) + })?; + + let groups = self.gamma_client.get_groups_for_user(&user.id).await?; + + Ok(GammaUser::from_user_and_groups(user, groups)) + } + + pub async fn get_by_cid(&self, cid: &str) -> HubbitResult { + log::warn!( + "Retrieving user by cid ('{cid}'), this is quite expensive and should be avoided if possible" + ); + + let user = self + .gamma_client + .get_users() + .await? + .into_iter() + .filter(|user| user.cid.as_str() == cid) + .next() + .ok_or(HubbitError::NotFound)?; + + let groups = self.gamma_client.get_groups_for_user(&user.id).await?; + + Ok(GammaUser::from_user_and_groups(user, groups)) + } + + pub async fn get_all(&self) -> HubbitResult> { + let mut mapped = vec![]; + for user in self.gamma_client.get_users().await?.into_iter() { + let groups = self.gamma_client.get_groups_for_user(&user.id).await?; + mapped.push(GammaUser::from_user_and_groups(user, groups)); } - let body = res.text().await?; - Ok(serde_json::from_str(&body)?) + Ok(mapped) } } diff --git a/backend/src/schema/device.rs b/backend/src/schema/device.rs index 82f2ff7..40d238d 100644 --- a/backend/src/schema/device.rs +++ b/backend/src/schema/device.rs @@ -3,7 +3,7 @@ use log::error; use uuid::Uuid; use crate::{ - models::GammaUser, + models::{AuthorizedUser, GammaUser}, repositories::{ device::{CreateDevice, DeviceRepository, UpdateDevice}, session::SessionRepository, @@ -76,11 +76,14 @@ impl DeviceMutation { } let device_repo = context.data_unchecked::(); - let auth_user = context.data_unchecked::(); - let current_devices = device_repo.get_for_user(auth_user.id).await.map_err(|e| { - error!("[Schema error] {:?}", e); - HubbitSchemaError::InternalError - })?; + let auth_user = context.data_unchecked::(); + let current_devices = device_repo + .get_for_user(auth_user.user_id) + .await + .map_err(|e| { + error!("[Schema error] {:?}", e); + HubbitSchemaError::InternalError + })?; let mut devices_to_create = Vec::new(); let mut devices_to_update = Vec::new(); @@ -130,7 +133,7 @@ impl DeviceMutation { .create(CreateDevice { address: device.address, name: device.name, - user_id: auth_user.id, + user_id: auth_user.user_id, }) .await .map_err(|e| { @@ -139,10 +142,13 @@ impl DeviceMutation { })?; } - let current_devices = device_repo.get_for_user(auth_user.id).await.map_err(|e| { - error!("[Schema error] {:?}", e); - HubbitSchemaError::InternalError - })?; + let current_devices = device_repo + .get_for_user(auth_user.user_id) + .await + .map_err(|e| { + error!("[Schema error] {:?}", e); + HubbitSchemaError::InternalError + })?; Ok( current_devices diff --git a/backend/src/schema/me.rs b/backend/src/schema/me.rs index 55e72c6..c1c6681 100644 --- a/backend/src/schema/me.rs +++ b/backend/src/schema/me.rs @@ -1,6 +1,6 @@ use async_graphql::{Context, Object}; -use crate::models::GammaUser; +use crate::models::AuthorizedUser; use super::{user::User, AuthGuard}; @@ -11,7 +11,7 @@ pub struct MeQuery; impl MeQuery { #[graphql(guard = AuthGuard)] pub async fn me(&self, context: &Context<'_>) -> User { - let user = context.data_unchecked::(); - User { id: user.id } + let user = context.data_unchecked::(); + User { id: user.user_id } } } diff --git a/backend/src/schema/mod.rs b/backend/src/schema/mod.rs index 66bcd5f..f18d2d6 100644 --- a/backend/src/schema/mod.rs +++ b/backend/src/schema/mod.rs @@ -10,7 +10,7 @@ use async_graphql::{Context, ErrorExtensions, Guard, MergedObject, Result, Schem use futures::StreamExt; use crate::{ - broker::SimpleBroker, event::UserEvent, models::GammaUser, + broker::SimpleBroker, event::UserEvent, models::AuthorizedUser, repositories::user_session::UserSessionRepository, }; @@ -108,7 +108,7 @@ pub struct AuthGuard; impl Guard for AuthGuard { async fn check(&self, context: &Context<'_>) -> Result<()> { - if context.data_opt::().is_some() { + if context.data_opt::().is_some() { Ok(()) } else { Err(HubbitSchemaError::NotLoggedIn.extend()) diff --git a/backend/src/schema/user.rs b/backend/src/schema/user.rs index 6ec4801..1d233a8 100644 --- a/backend/src/schema/user.rs +++ b/backend/src/schema/user.rs @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize}; use uuid::Uuid; use crate::{ - models::{GammaUser, UserSession}, + models::{AuthorizedUser, GammaGroupType, GammaUser, UserSession}, repositories::{device::DeviceRepository, user_session::UserSessionRepository}, services::{hour_stats::HourStatsService, user::UserService}, utils::{MAX_DATETIME, MIN_DATETIME}, @@ -69,6 +69,7 @@ impl User { } async fn cid(&self, context: &Context<'_>) -> HubbitSchemaResult { + log::info!("Retrieving CID for user {}", self.id); let user_service = context.data_unchecked::(); let user = user_service.get_by_id(self.id, false).await.map_err(|e| { error!("[Schema error] {:?}", e); @@ -104,15 +105,6 @@ impl User { Ok(user.last_name) } - async fn avatar_url(&self, context: &Context<'_>) -> HubbitSchemaResult { - let user_service = context.data_unchecked::(); - let user = user_service.get_by_id(self.id, false).await.map_err(|e| { - error!("[Schema error] {:?}", e); - HubbitSchemaError::InternalError - })?; - Ok(user.avatar_url) - } - async fn groups(&self, context: &Context<'_>) -> HubbitSchemaResult> { let user_service = context.data_unchecked::(); let config = context.data_unchecked::(); @@ -120,11 +112,12 @@ impl User { error!("[Schema error] {:?}", e); HubbitSchemaError::InternalError })?; + let mut groups = user .groups .into_iter() .filter(|group| { - group.active + group.super_group.group_type != GammaGroupType::Alumni && (config.group_whitelist.is_empty() || config.group_whitelist.contains(&group.super_group.name)) }) @@ -151,7 +144,7 @@ impl User { } async fn recent_sessions(&self, context: &Context<'_>) -> HubbitSchemaResult> { - let user = context.data_unchecked::(); + let user = context.data_unchecked::(); let user_session_repo = context.data_unchecked::(); let sessions = user_session_repo @@ -161,7 +154,7 @@ impl User { error!("[Schema error] {:?}", e); HubbitSchemaError::InternalError })?; - let sessions_limit = if user.id == self.id { 10 } else { 1 }; + let sessions_limit = if user.user_id == self.id { 10 } else { 1 }; Ok( sessions .iter() @@ -291,10 +284,11 @@ impl User { } pub async fn devices(&self, context: &Context<'_>) -> HubbitSchemaResult> { - let auth_user = context - .data::() - .map_err(|_| HubbitSchemaError::NotLoggedIn)?; - if self.id != auth_user.id { + let auth_user = context.data::().map_err(|err| { + error!("Failed to retrieve current user for devices, err: {err:?}"); + HubbitSchemaError::NotLoggedIn + })?; + if self.id != auth_user.user_id { return Err(HubbitSchemaError::NotAuthorized); } diff --git a/backend/src/services/user.rs b/backend/src/services/user.rs index d6f0fec..6206d30 100644 --- a/backend/src/services/user.rs +++ b/backend/src/services/user.rs @@ -65,16 +65,16 @@ impl UserService { self.store_user_in_cache(user_entry.user.clone()).await; let redis_pool = self.redis_pool.clone(); let user_repo = self.user_repo.clone(); - tokio::spawn(async move { - Self::fetch_and_store_user_redis(user_repo, redis_pool, id.to_string()).await - }); + tokio::spawn( + async move { Self::fetch_and_store_user_redis(user_repo, redis_pool, &id).await }, + ); return Ok(user_entry.user); } } // If in neither local cache or redis, fetch the user - self.fetch_and_store_user(id.to_string()).await + self.fetch_and_store_user(&id).await } pub async fn get_by_cid(&self, cid: String) -> HubbitResult { @@ -82,7 +82,10 @@ impl UserService { if let Ok(id) = redis_get::(self.redis_pool.clone(), &key).await { self.get_by_id(id, false).await } else { - self.fetch_and_store_user(cid).await + log::info!( + "Retrieving user by cid ('{cid}'), this is quite expensive and should be avoided if possible" + ); + self.fetch_and_store_user_by_cid(cid).await } } @@ -121,7 +124,7 @@ impl UserService { let redis_pool = self.redis_pool.clone(); let user_repo = self.user_repo.clone(); tokio::spawn(async move { - Self::fetch_and_store_user_redis(user_repo, redis_pool, id.to_string()).await + Self::fetch_and_store_user_redis(user_repo, redis_pool, &id).await }); } } else { @@ -136,7 +139,7 @@ impl UserService { let user_repo = self.user_repo.clone(); let redis_pool = self.redis_pool.clone(); async move { - match user_repo.get(id.to_string()).await { + match user_repo.get(id).await { Ok(user) => { let user_entry = UserEntry { user: user.clone(), @@ -163,17 +166,30 @@ impl UserService { Ok(users) } - async fn fetch_and_store_user(&self, id: String) -> HubbitResult { + async fn fetch_and_store_user(&self, id: &Uuid) -> HubbitResult { + log::info!("Fetching user from auth service, id: {id:?}"); let user = Self::fetch_and_store_user_redis(self.user_repo.clone(), self.redis_pool.clone(), id).await?; self.store_user_in_cache(user.clone()).await; Ok(user) } + async fn fetch_and_store_user_by_cid(&self, cid: String) -> HubbitResult { + log::info!("Fetching user from auth service by cid: {cid:?}"); + let user = Self::fetch_and_store_user_by_cid_redis( + self.user_repo.clone(), + self.redis_pool.clone(), + cid.as_str(), + ) + .await?; + self.store_user_in_cache(user.clone()).await; + Ok(user) + } + async fn fetch_and_store_user_redis( user_repo: UserRepository, redis_pool: RedisPool, - id: String, + id: &Uuid, ) -> HubbitResult { let user = user_repo.get(id).await?; let user_entry = UserEntry { @@ -184,6 +200,20 @@ impl UserService { Ok(user) } + async fn fetch_and_store_user_by_cid_redis( + user_repo: UserRepository, + redis_pool: RedisPool, + cid: &str, + ) -> HubbitResult { + let user = user_repo.get_by_cid(cid).await?; + let user_entry = UserEntry { + user: user.clone(), + updated_at: Local::now(), + }; + tokio::spawn(async move { Self::store_user_redis(redis_pool, user_entry).await }); + Ok(user) + } + async fn store_user_redis(redis_pool: RedisPool, user_entry: UserEntry) -> HubbitResult<()> { let id_key = format!("user:id:{}", user_entry.user.id); let cid_key = format!("user:cid:{}", user_entry.user.cid); diff --git a/backend/src/utils/gamma.rs b/backend/src/utils/gamma.rs deleted file mode 100644 index 0639652..0000000 --- a/backend/src/utils/gamma.rs +++ /dev/null @@ -1,55 +0,0 @@ -use reqwest::Client; -use serde::{Deserialize, Serialize}; - -use crate::{config::Config, error::HubbitResult, models::GammaUser}; - -#[derive(Debug, Deserialize)] -pub struct GammaTokenResponse { - pub access_token: String, -} - -#[derive(Debug, Serialize)] -struct GammaTokenRequest { - client_id: String, - client_secret: String, - code: String, - redirect_uri: String, - grant_type: String, -} - -pub async fn oauth2_token(config: &Config, code: &str) -> HubbitResult { - let client = Client::new(); - - let url = format!("{}/oauth2/token", config.gamma_internal_url); - - let body_str = client - .post(&url) - .form(&GammaTokenRequest { - client_id: config.gamma_client_id.clone(), - client_secret: config.gamma_client_secret.clone(), - code: code.into(), - redirect_uri: config.gamma_redirect_uri.clone(), - grant_type: "authorization_code".into(), - }) - .header("accept", "application/json") - .send() - .await? - .text() - .await?; - - Ok(serde_json::from_str(&body_str)?) -} - -pub async fn get_current_user(config: &Config, access_token: &str) -> HubbitResult { - let client = Client::new(); - let url = format!("{}/oauth2/userinfo", config.gamma_internal_url); - let body_str = client - .get(&url) - .bearer_auth(access_token) - .send() - .await? - .text() - .await?; - - Ok(serde_json::from_str(&body_str)?) -} diff --git a/backend/src/utils/mod.rs b/backend/src/utils/mod.rs index fb643d0..fe90413 100644 --- a/backend/src/utils/mod.rs +++ b/backend/src/utils/mod.rs @@ -1,5 +1,3 @@ -pub mod gamma; - use chrono::{DateTime, Local, TimeZone}; use lazy_static::lazy_static; diff --git a/frontend/schema.gql b/frontend/schema.gql index d90a17e..de722f7 100644 --- a/frontend/schema.gql +++ b/frontend/schema.gql @@ -1,8 +1,9 @@ type ActiveSession { - user: User! - startTime: DateTime! + user: User! + startTime: DateTime! } + """ Implement the DateTime scalar @@ -11,122 +12,126 @@ The input/output is a string in RFC3339 format. scalar DateTime type Device { - id: UUID! - address: String! - name: String! - isActive: Boolean! + id: UUID! + address: String! + name: String! + isActive: Boolean! } input DeviceInput { - address: String! - name: String! + address: String! + name: String! } + type Group { - name: String! - prettyName: String! + name: String! + prettyName: String! } + + type MutationRoot { - setDevices(data: SetDevicesInput!): [Device!]! + setDevices(data: SetDevicesInput!): [Device!]! } enum Period { - SUMMER - LP1 - LP2 - LP3 - LP4 + SUMMER + LP1 + LP2 + LP3 + LP4 } type QueryRoot { - currentSessions: [ActiveSession!]! - statsAlltime: [Stat!]! - statsStudyYear(input: StatsStudyYearInput): StatsStudyYearPayload! - statsStudyPeriod(input: StatsStudyPeriodInput): StatsStudyPeriodPayload! - statsMonth(input: StatsMonthInput): StatsMonthPayload! - statsWeek(input: StatsWeekInput): StatsWeekPayload! - statsDay(input: StatsDayInput): StatsDayPayload! - me: User! - user(input: UserUniqueInput!): User! + currentSessions: [ActiveSession!]! + statsAlltime: [Stat!]! + statsStudyYear(input: StatsStudyYearInput): StatsStudyYearPayload! + statsStudyPeriod(input: StatsStudyPeriodInput): StatsStudyPeriodPayload! + statsMonth(input: StatsMonthInput): StatsMonthPayload! + statsWeek(input: StatsWeekInput): StatsWeekPayload! + statsDay(input: StatsDayInput): StatsDayPayload! + me: User! + user(input: UserUniqueInput!): User! } type Session { - startTime: DateTime! - endTime: DateTime! + startTime: DateTime! + endTime: DateTime! } input SetDevicesInput { - devices: [DeviceInput!]! + devices: [DeviceInput!]! } type Stat { - user: User! - durationSeconds: Int! - currentPosition: Int! - prevPosition: Int + user: User! + durationSeconds: Int! + currentPosition: Int! + prevPosition: Int } input StatsDayInput { - year: Int! - month: Int! - day: Int! + year: Int! + month: Int! + day: Int! } type StatsDayPayload { - stats: [Stat!]! - curr: YearMonthDay! - next: YearMonthDay! - prev: YearMonthDay! + stats: [Stat!]! + curr: YearMonthDay! + next: YearMonthDay! + prev: YearMonthDay! } input StatsMonthInput { - year: Int! - month: Int! + year: Int! + month: Int! } type StatsMonthPayload { - stats: [Stat!]! - curr: YearMonth! - next: YearMonth! - prev: YearMonth! + stats: [Stat!]! + curr: YearMonth! + next: YearMonth! + prev: YearMonth! } input StatsStudyPeriodInput { - year: Int! - period: Period! + year: Int! + period: Period! } type StatsStudyPeriodPayload { - stats: [Stat!]! - year: Int! - period: Period! + stats: [Stat!]! + year: Int! + period: Period! } input StatsStudyYearInput { - year: Int! + year: Int! } type StatsStudyYearPayload { - stats: [Stat!]! - year: Int! + stats: [Stat!]! + year: Int! } input StatsWeekInput { - year: Int! - week: Int! + year: Int! + week: Int! } type StatsWeekPayload { - stats: [Stat!]! - curr: YearWeek! - next: YearWeek! - prev: YearWeek! + stats: [Stat!]! + curr: YearWeek! + next: YearWeek! + prev: YearWeek! } + type SubscriptionRoot { - userJoin: ActiveSession! - userLeave: User! + userJoin: ActiveSession! + userLeave: User! } """ @@ -142,47 +147,50 @@ entities without requiring a central allocating authority. scalar UUID type User { - id: UUID! - cid: String! - nick: String! - firstName: String! - lastName: String! - avatarUrl: String! - groups: [Group!]! - hourStats: [Int!]! - recentSessions: [Session!]! - longestSession: Session - totalTimeSeconds: Int! - averageTimePerDay: Int! - timeTodaySeconds: Int! - devices: [Device!]! - currAlltimePosition: Int - currStudyYearPosition: Int + id: UUID! + cid: String! + nick: String! + firstName: String! + lastName: String! + groups: [Group!]! + hourStats: [Int!]! + recentSessions: [Session!]! + longestSession: Session + totalTimeSeconds: Int! + averageTimePerDay: Int! + timeTodaySeconds: Int! + devices: [Device!]! + currAlltimePosition: Int + currStudyYearPosition: Int } input UserUniqueInput { - id: UUID - cid: String + id: UUID + cid: String } type YearMonth { - year: Int! - month: Int! + year: Int! + month: Int! } type YearMonthDay { - year: Int! - month: Int! - day: Int! + year: Int! + month: Int! + day: Int! } type YearWeek { - year: Int! - week: Int! + year: Int! + week: Int! } +directive @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT +directive @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT +directive @specifiedBy(url: String!) on SCALAR schema { - query: QueryRoot - mutation: MutationRoot - subscription: SubscriptionRoot + query: QueryRoot + mutation: MutationRoot + subscription: SubscriptionRoot } + From 247d16398af3567cf908f4a74f1465bac32661f9 Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 01:45:34 +0200 Subject: [PATCH 05/13] Updated docker-compose vars --- docker-compose.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index cb3d421..0cb603f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,16 +20,10 @@ services: PORT: 8080 DATABASE_URL: postgres://hubbit:hubbit@hubbit-db/hubbit REDIS_URL: redis://hubbit-redis:6379 - # GAMMA_PUBLIC_URL: http://localhost:8081 - GAMMA_PUBLIC_URL: https://auth.chalmers.it - # GAMMA_INTERNAL_URL: http://gamma-backend:3000 - GAMMA_INTERNAL_URL: https://auth.chalmers.it - # GAMMA_API_KEY: hubbit - # GAMMA_CLIENT_ID: hubbit - # GAMMA_CLIENT_SECRET: hubbit - GAMMA_API_KEY: INSERT_FIELD_HERE - GAMMA_CLIENT_ID: INSERT_FIELD_HERE - GAMMA_CLIENT_SECRET: INSERT_FIELD_HERE + GAMMA_API_KEY: hubbit + GAMMA_CLIENT_ID: hubbit + GAMMA_CLIENT_SECRET: hubbit + GAMMA_URL: auth.chalmers.it GAMMA_REDIRECT_URI: http://localhost:3000/api/auth/gamma/callback COOKIE_SECRET: vVQvsmpCkHLuleJthaEd5KhCC23mnW3W5RGSNGQOru6Y32VBrddDJEMNSXGXiKeqWhTEOAQRlfYtYjbuLMY1N2PuDbOaMzx7UPpt6Ejnm2Rq4C3Wwew8wlLbMHOt14SQ COOKIE_SECURE: true From 17c8272c51d04f30239eda25ac515367de62d91f Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 01:53:32 +0200 Subject: [PATCH 06/13] Fix clippy warnings --- backend/src/handlers/auth.rs | 2 +- backend/src/repositories/user.rs | 3 +-- backend/src/schema/device.rs | 2 +- backend/src/schema/user.rs | 2 +- frontend/src/components/stats-table/StatsTable.tsx | 5 +++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/backend/src/handlers/auth.rs b/backend/src/handlers/auth.rs index 738cd0c..c53dd5f 100644 --- a/backend/src/handlers/auth.rs +++ b/backend/src/handlers/auth.rs @@ -100,7 +100,7 @@ async fn gamma_callback( } }; - if let Err(_) = session.insert("gamma_access_token", token) { + if session.insert("gamma_access_token", token).is_err() { error!("[Gamma auth] Could not set gamma_acess_token key in cookie"); return HttpResponse::InternalServerError().finish(); } diff --git a/backend/src/repositories/user.rs b/backend/src/repositories/user.rs index 05d7a00..d653bd7 100644 --- a/backend/src/repositories/user.rs +++ b/backend/src/repositories/user.rs @@ -42,8 +42,7 @@ impl UserRepository { .get_users() .await? .into_iter() - .filter(|user| user.cid.as_str() == cid) - .next() + .find(|user| user.cid.as_str() == cid) .ok_or(HubbitError::NotFound)?; let groups = self.gamma_client.get_groups_for_user(&user.id).await?; diff --git a/backend/src/schema/device.rs b/backend/src/schema/device.rs index 40d238d..10b2853 100644 --- a/backend/src/schema/device.rs +++ b/backend/src/schema/device.rs @@ -3,7 +3,7 @@ use log::error; use uuid::Uuid; use crate::{ - models::{AuthorizedUser, GammaUser}, + models::AuthorizedUser, repositories::{ device::{CreateDevice, DeviceRepository, UpdateDevice}, session::SessionRepository, diff --git a/backend/src/schema/user.rs b/backend/src/schema/user.rs index 1d233a8..3fa5b64 100644 --- a/backend/src/schema/user.rs +++ b/backend/src/schema/user.rs @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize}; use uuid::Uuid; use crate::{ - models::{AuthorizedUser, GammaGroupType, GammaUser, UserSession}, + models::{AuthorizedUser, GammaGroupType, UserSession}, repositories::{device::DeviceRepository, user_session::UserSessionRepository}, services::{hour_stats::HourStatsService, user::UserService}, utils::{MAX_DATETIME, MIN_DATETIME}, diff --git a/frontend/src/components/stats-table/StatsTable.tsx b/frontend/src/components/stats-table/StatsTable.tsx index fd81d26..38e0c8c 100644 --- a/frontend/src/components/stats-table/StatsTable.tsx +++ b/frontend/src/components/stats-table/StatsTable.tsx @@ -10,8 +10,7 @@ import { StatsTableStatFragment, } from '../../__generated__/graphql'; import { formatNick } from '../../util'; - -import styles from './StatsTable.module.scss'; +import styles from "./StatsTable.module.scss"; import Image from 'next/image'; interface Props { @@ -85,6 +84,8 @@ const StatsTable = ({ stats, me, hideChange = false, currentActive }: Props) => src={getChangeImageName(stat.currentPosition, stat.prevPosition)} alt="position change icon" className={styles.changeIcon} + width={16} + height={16} /> )} From 01538f41373be3dc1139cd6851dce7fe0c6d4d10 Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 01:54:40 +0200 Subject: [PATCH 07/13] Update default auth url to use https --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0cb603f..4a3b951 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,7 +23,7 @@ services: GAMMA_API_KEY: hubbit GAMMA_CLIENT_ID: hubbit GAMMA_CLIENT_SECRET: hubbit - GAMMA_URL: auth.chalmers.it + GAMMA_URL: https://auth.chalmers.it GAMMA_REDIRECT_URI: http://localhost:3000/api/auth/gamma/callback COOKIE_SECRET: vVQvsmpCkHLuleJthaEd5KhCC23mnW3W5RGSNGQOru6Y32VBrddDJEMNSXGXiKeqWhTEOAQRlfYtYjbuLMY1N2PuDbOaMzx7UPpt6Ejnm2Rq4C3Wwew8wlLbMHOt14SQ COOKIE_SECURE: true From e130c916ae2c7a56f9a5e97668463bf77834f8b5 Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 02:05:02 +0200 Subject: [PATCH 08/13] Remove extra log --- backend/src/services/user.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/backend/src/services/user.rs b/backend/src/services/user.rs index 6206d30..79f61ba 100644 --- a/backend/src/services/user.rs +++ b/backend/src/services/user.rs @@ -82,9 +82,6 @@ impl UserService { if let Ok(id) = redis_get::(self.redis_pool.clone(), &key).await { self.get_by_id(id, false).await } else { - log::info!( - "Retrieving user by cid ('{cid}'), this is quite expensive and should be avoided if possible" - ); self.fetch_and_store_user_by_cid(cid).await } } From 34eb43178730c14128002bf0d5e9c9d914b680dc Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 02:05:11 +0200 Subject: [PATCH 09/13] Fix import quotations --- frontend/src/components/stats-table/StatsTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/stats-table/StatsTable.tsx b/frontend/src/components/stats-table/StatsTable.tsx index 38e0c8c..50420d4 100644 --- a/frontend/src/components/stats-table/StatsTable.tsx +++ b/frontend/src/components/stats-table/StatsTable.tsx @@ -10,7 +10,7 @@ import { StatsTableStatFragment, } from '../../__generated__/graphql'; import { formatNick } from '../../util'; -import styles from "./StatsTable.module.scss"; +import styles from './StatsTable.module.scss'; import Image from 'next/image'; interface Props { From 56285a4ccb6d20b921561079cb7ce91abfa8cbcc Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 02:17:40 +0200 Subject: [PATCH 10/13] Remove old gamma from dev flow --- docker-compose.yml | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4a3b951..0985904 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,46 +63,3 @@ services: - ${REDIS_UI_PORT}:7843 volumes: - /settings - - # gamma-frontend: - # image: cthit/gamma-frontend:development - # environment: - # HTTP_PROXY: http://gamma-backend:3000 - # ports: - # - ${LOCAL_GAMMA_FRONTEND_PORT}:3000 - - # gamma-backend: - # image: cthit/gamma-backend - # environment: - # # Default admin user name = admin - # # Default admin password = password - - # DB_USER: gamma - # DB_PASSWORD: gamma - # DB_HOST: gamma-db - # DB_PORT: 5432 - # DB_NAME: gamma - - # REDIS_HOST: gamma-redis - # REDIS_PASSWORD: "" - # REDIS_PORT: 6379 - - # SERVER_PORT: 3000 - # SUCCESSFUL_LOGIN: http://localhost:${LOCAL_GAMMA_FRONTEND_PORT} - # CORS_ALLOWED_ORIGIN: http://localhost:${LOCAL_GAMMA_FRONTEND_PORT} - # BACKEND_URI: http://localhost:${LOCAL_GAMMA_BACKEND_PORT}/api/ - # PRODUCTION: "false" - # COOKIE_DOMAIN: localhost - # IS_MOCKING: "true" - # ports: - # - ${LOCAL_GAMMA_BACKEND_PORT}:3000 - - # gamma-redis: - # image: redis:5.0 - - # gamma-db: - # image: postgres:10 - # environment: - # POSTGRES_USER: gamma - # POSTGRES_DB: gamma - # POSTGRES_PASSWORD: gamma From 3df5c6e7dadc01064069d7898858cf8b473641f9 Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 02:51:39 +0200 Subject: [PATCH 11/13] Fix build flow --- backend/Cargo.lock | 11 +++++++++++ backend/Cargo.toml | 1 + backend/Dockerfile | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index ff83316..8feb7c3 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -628,6 +628,7 @@ dependencies = [ "mobc", "mobc-redis", "once_cell", + "openssl", "rand", "reqwest 0.11.27", "serde", @@ -2099,6 +2100,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.2.3+3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.102" @@ -2107,6 +2117,7 @@ checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 8b39c8f..9d3cd09 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -26,6 +26,7 @@ reqwest = { version = "0.11.24", default-features = false, features = [ ] } serde = { version = "1.0.197", features = ["derive"] } serde_json = "1.0.114" +openssl = { version = "0.10", features = ["vendored"] } slab = "0.4.9" sqlx = { version = "0.7.3", features = [ "runtime-tokio-rustls", diff --git a/backend/Dockerfile b/backend/Dockerfile index b21d880..df67307 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -17,7 +17,7 @@ RUN cargo install strip_cargo_version RUN rustup target add x86_64-unknown-linux-musl # Required by `brotli-sys` -RUN apt-get update && apt-get install -y musl-tools +RUN apt-get update && apt-get install -y musl-tools pkg-config libssl-dev ########################### ### STRIP-VERSION STAGE ### From 91a0dc8dd7bfc025b9550c4c49c2a3762ca37a41 Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 21:30:39 +0200 Subject: [PATCH 12/13] Reset to 13.2 Prod is using 13.2 still so better to match that (simplifies importation of backups etc). --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0985904..aae8d69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -39,7 +39,7 @@ services: command: ["./wait-for-postgres.sh", "hubbit-db", "${PG_PASSWORD}", "${PG_USERNAME}", "sh", "-c", "cargo sqlx migrate run && cargo watch -x run"] hubbit-db: - image: postgres:16 + image: postgres:13.2 environment: POSTGRES_DB: ${PG_DATABASE} POSTGRES_USER: ${PG_USERNAME} From 86a4b4a61cfd02fd97a4eb3c38e96474e2dd5fac Mon Sep 17 00:00:00 2001 From: Vidar Magnusson Date: Sun, 23 Jun 2024 21:31:50 +0200 Subject: [PATCH 13/13] Update to using cthit version of gamma client --- backend/Cargo.lock | 2 +- backend/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/Cargo.lock b/backend/Cargo.lock index 8feb7c3..0ce60eb 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1304,7 +1304,7 @@ dependencies = [ [[package]] name = "gamma_rust_client" version = "0.1.0" -source = "git+https://github.com/viddem/gamma.git?rev=1235842562c9f3b50a68582dea13f66fbe93cf5e#1235842562c9f3b50a68582dea13f66fbe93cf5e" +source = "git+https://github.com/cthit/gamma.git?rev=5b832d0ddc91d68aa4db1d35a40bd57251b51f39#5b832d0ddc91d68aa4db1d35a40bd57251b51f39" dependencies = [ "rand", "reqwest 0.12.5", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 9d3cd09..741e689 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -44,4 +44,4 @@ tokio = { version = "1.36.0", features = [ "time", ] } uuid = { version = "1.7.0", features = ["serde"] } -gamma_rust_client = { git = "https://github.com/viddem/gamma.git", rev = "1235842562c9f3b50a68582dea13f66fbe93cf5e" } +gamma_rust_client = { git = "https://github.com/cthit/gamma.git", rev = "5b832d0ddc91d68aa4db1d35a40bd57251b51f39" }