diff --git a/Cargo-1.65.lock b/Cargo-1.65.lock index 1600c51..5131014 100644 --- a/Cargo-1.65.lock +++ b/Cargo-1.65.lock @@ -128,6 +128,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "bitflags" version = "1.2.1" @@ -177,9 +183,9 @@ checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" [[package]] name = "cfg-if" @@ -283,7 +289,7 @@ dependencies = [ "openssl-probe", "openssl-sys", "schannel", - "socket2", + "socket2 0.3.19", "winapi", ] @@ -322,6 +328,12 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "event-listener" version = "2.5.2" @@ -404,17 +416,6 @@ dependencies = [ "waker-fn", ] -[[package]] -name = "futures-macro" -version = "0.3.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "futures-sink" version = "0.3.21" @@ -435,7 +436,6 @@ checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" dependencies = [ "futures-core", "futures-io", - "futures-macro", "futures-task", "memchr", "pin-project-lite", @@ -455,9 +455,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", "js-sys", @@ -480,9 +480,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.13" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a82c6d637fc9515a4694bbf1cb2457b79d81ce52b3108bdeea58b07dd34a57" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", @@ -499,9 +499,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "hermit-abi" @@ -551,21 +551,21 @@ dependencies = [ [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.4" +version = "0.14.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e946c2b1349055e0b72ae281b238baf1a3ea7307c7e9f9d64673bdd9c26ac7" +checksum = "b26ae0a80afebe130861d90abf98e3814a4f28a4c6ffeb5ab8ebb2be311e0ef2" dependencies = [ "bytes", "futures-channel", @@ -576,9 +576,9 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa 0.4.8", - "pin-project", - "socket2", + "itoa 1.0.2", + "pin-project-lite", + "socket2 0.4.10", "tokio", "tower-service", "tracing", @@ -587,17 +587,15 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ - "futures-util", + "http", "hyper", - "log", - "rustls", + "rustls 0.20.9", "tokio", "tokio-rustls", - "webpki", ] [[package]] @@ -626,11 +624,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.7.0" +version = "2.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" dependencies = [ - "autocfg", + "equivalent", "hashbrown", ] @@ -687,9 +685,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libz-sys" @@ -765,9 +763,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.7" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static", "libc", @@ -788,7 +786,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "670361df1bc2399ee1ff50406a0d422587dd3bb0da596e1978fe8e05dabddf4f" dependencies = [ "libc", - "socket2", + "socket2 0.3.19", ] [[package]] @@ -835,7 +833,7 @@ version = "5.0.0-alpha.3" dependencies = [ "anyhow", "async-std", - "base64", + "base64 0.13.0", "chrono", "curl", "getrandom", @@ -931,26 +929,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -[[package]] -name = "pin-project" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78203e83c48cffbe01e4a2d35d566ca4de445d79a85372fc64e378bfc812a260" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710faf75e1b33345361201d36d04e98ac1ed8909151a017ed384700836104c74" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "pin-project-lite" version = "0.2.9" @@ -1056,15 +1034,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.0" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ - "base64", + "base64 0.13.0", "bytes", "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", "hyper", @@ -1078,17 +1057,20 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.20.9", + "rustls-pemfile", "serde", + "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", "tokio-rustls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", + "webpki-roots 0.22.6", "winreg", ] @@ -1101,23 +1083,59 @@ dependencies = [ "cc", "libc", "once_cell", - "spin", - "untrusted", + "spin 0.5.2", + "untrusted 0.7.1", "web-sys", "winapi", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + [[package]] name = "rustls" version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" dependencies = [ - "base64", + "base64 0.13.0", "log", - "ring", - "sct", - "webpki", + "ring 0.16.20", + "sct 0.6.1", + "webpki 0.21.4", +] + +[[package]] +name = "rustls" +version = "0.20.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" +dependencies = [ + "log", + "ring 0.16.20", + "sct 0.7.1", + "webpki 0.22.4", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", ] [[package]] @@ -1133,7 +1151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] @@ -1148,8 +1166,18 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -1270,12 +1298,28 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "subtle" version = "2.4.1" @@ -1385,13 +1429,13 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.22.0" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls", + "rustls 0.20.9", "tokio", - "webpki", + "webpki 0.22.4", ] [[package]] @@ -1485,20 +1529,26 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "ureq" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3131cd6cb18488da91da1d10ed31e966f453c06b65bf010d35638456976a3fd7" dependencies = [ - "base64", + "base64 0.13.0", "chunked_transfer", "log", "once_cell", - "rustls", + "rustls 0.19.1", "url", - "webpki", - "webpki-roots", + "webpki 0.21.4", + "webpki-roots 0.21.1", ] [[package]] @@ -1580,8 +1630,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b608ecc8f4198fe8680e2ed18eccab5f0cd4caaf3d83516fa5fb2e927fda2586" dependencies = [ "cfg-if", - "serde", - "serde_json", "wasm-bindgen-macro", ] @@ -1657,8 +1705,18 @@ version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" dependencies = [ - "ring", - "untrusted", + "ring 0.16.20", + "untrusted 0.7.1", +] + +[[package]] +name = "webpki" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -1667,7 +1725,16 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" dependencies = [ - "webpki", + "webpki 0.21.4", +] + +[[package]] +name = "webpki-roots" +version = "0.22.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" +dependencies = [ + "webpki 0.22.4", ] [[package]] @@ -1707,48 +1774,114 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "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", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.52.4", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + [[package]] name = "winreg" -version = "0.7.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi", ] diff --git a/Cargo.toml b/Cargo.toml index 42490e0..768126b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ base64 = "0.13" thiserror = "1.0" http = "0.2" rand = "0.8" -reqwest = { version = "0.11", optional = true, default-features = false } +reqwest = { version = "0.11.11", optional = true, default-features = false } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" sha2 = "0.10" diff --git a/src/devicecode.rs b/src/devicecode.rs index 63141ab..dac082a 100644 --- a/src/devicecode.rs +++ b/src/devicecode.rs @@ -121,7 +121,7 @@ where impl<'a, TE> DeviceAuthorizationRequest<'a, TE> where - TE: ErrorResponse + 'static, + TE: ErrorResponse + Send + Sync + 'static, { /// Appends an extra param to the token request. /// @@ -196,7 +196,7 @@ where ) -> Pin>> where Self: 'c, - C: AsyncHttpClient<'c>, + C: AsyncHttpClient<'c> + Send + Sync, EF: ExtraDeviceAuthorizationFields, { Box::pin(async move { endpoint_response(http_client.call(self.prepare_request()?).await?) }) @@ -331,9 +331,12 @@ where > where Self: 'c, - C: AsyncHttpClient<'c>, - S: Fn(Duration) -> SF + 'c, - SF: Future, + C: AsyncHttpClient<'c> + Send + Sync, + EF: Send + Sync, + S: Fn(Duration) -> SF + Send + Sync + 'c, + SF: Future + Send + Sync, + TR: Send + Sync, + TT: Send + Sync, { Box::pin(async move { // Get the request timeout and starting interval diff --git a/src/endpoint.rs b/src/endpoint.rs index ffdddf0..fed2dc6 100644 --- a/src/endpoint.rs +++ b/src/endpoint.rs @@ -22,18 +22,18 @@ pub type HttpResponse = http::Response>; /// An asynchronous (future-based) HTTP client. pub trait AsyncHttpClient<'c> { /// Error type returned by HTTP client. - type Error: Error + 'static; + type Error: Error + Send + Sync + 'static; /// Perform a single HTTP request. fn call( &'c self, request: HttpRequest, - ) -> Pin> + 'c>>; + ) -> Pin> + Send + Sync + 'c>>; } impl<'c, E, F, T> AsyncHttpClient<'c> for T where - E: Error + 'static, - F: Future> + 'c, + E: Error + Send + Sync + 'static, + F: Future> + Send + Sync + 'c, // We can't implement this for FnOnce because the device authorization flow requires clients to // supportmultiple calls. T: Fn(HttpRequest) -> F, @@ -43,7 +43,7 @@ where fn call( &'c self, request: HttpRequest, - ) -> Pin> + 'c>> { + ) -> Pin> + Send + Sync + 'c>> { Box::pin(self(request)) } } diff --git a/src/introspection.rs b/src/introspection.rs index d12a93c..6253c4e 100644 --- a/src/introspection.rs +++ b/src/introspection.rs @@ -183,7 +183,10 @@ where ) -> Pin>::Error, TE, TIR>>> where Self: 'c, - C: AsyncHttpClient<'c>, + C: AsyncHttpClient<'c> + Send + Sync, + TE: Send + Sync, + TIR: Send + Sync, + TT: Send + Sync, { Box::pin(async move { endpoint_response(http_client.call(self.prepare_request()?).await?) }) } diff --git a/src/reqwest_client.rs b/src/reqwest_client.rs index 594e49d..682db59 100644 --- a/src/reqwest_client.rs +++ b/src/reqwest_client.rs @@ -9,7 +9,7 @@ impl<'c> AsyncHttpClient<'c> for reqwest::Client { fn call( &'c self, request: HttpRequest, - ) -> Pin> + 'c>> { + ) -> Pin> + Send + Sync + 'c>> { Box::pin(async move { let response = self .execute(request.try_into().map_err(Box::new)?) diff --git a/src/revocation.rs b/src/revocation.rs index 192e751..491c297 100644 --- a/src/revocation.rs +++ b/src/revocation.rs @@ -305,7 +305,9 @@ where ) -> Pin>::Error, TE, ()>>> where Self: 'c, - C: AsyncHttpClient<'c>, + C: AsyncHttpClient<'c> + Send + Sync, + RT: Send + Sync, + TE: Send + Sync, { Box::pin(async move { endpoint_response(http_client.call(self.prepare_request()?).await?) }) } diff --git a/src/token/mod.rs b/src/token/mod.rs index 9e57851..db15548 100644 --- a/src/token/mod.rs +++ b/src/token/mod.rs @@ -131,7 +131,7 @@ where /// Future returned by `request_async` methods. pub type TokenRequestFuture<'c, RE, TE, TR> = - dyn Future>> + 'c; + dyn Future>> + Send + Sync + 'c; /// A request to exchange an authorization code for an access token. /// @@ -240,7 +240,10 @@ where ) -> Pin>::Error, TE, TR>>> where Self: 'c, - C: AsyncHttpClient<'c>, + C: AsyncHttpClient<'c> + Send + Sync, + TE: Send + Sync, + TR: Send + Sync, + TT: Send + Sync, { Box::pin(async move { endpoint_response(http_client.call(self.prepare_request()?).await?) }) } @@ -325,7 +328,10 @@ where ) -> Pin>::Error, TE, TR>>> where Self: 'c, - C: AsyncHttpClient<'c>, + C: AsyncHttpClient<'c> + Send + Sync, + TE: Send + Sync, + TR: Send + Sync, + TT: Send + Sync, { Box::pin(async move { endpoint_response(http_client.call(self.prepare_request()?).await?) }) } @@ -432,7 +438,10 @@ where ) -> Pin>::Error, TE, TR>>> where Self: 'c, - C: AsyncHttpClient<'c>, + C: AsyncHttpClient<'c> + Send + Sync, + TE: Send + Sync, + TR: Send + Sync, + TT: Send + Sync, { Box::pin(async move { endpoint_response(http_client.call(self.prepare_request()?).await?) }) } @@ -538,7 +547,10 @@ where ) -> Pin>::Error, TE, TR>>> where Self: 'c, - C: AsyncHttpClient<'c>, + C: AsyncHttpClient<'c> + Send + Sync, + TE: Send + Sync, + TR: Send + Sync, + TT: Send + Sync, { Box::pin(async move { endpoint_response(http_client.call(self.prepare_request()?).await?) }) }