You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Bump the latest axum rc
This commit is contained in:
242
Cargo.lock
generated
242
Cargo.lock
generated
@ -319,7 +319,7 @@ dependencies = [
|
|||||||
"http",
|
"http",
|
||||||
"hyper",
|
"hyper",
|
||||||
"ring",
|
"ring",
|
||||||
"time 0.3.16",
|
"time 0.3.17",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tower",
|
"tower",
|
||||||
"tracing",
|
"tracing",
|
||||||
@ -451,7 +451,7 @@ dependencies = [
|
|||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"regex",
|
"regex",
|
||||||
"ring",
|
"ring",
|
||||||
"time 0.3.16",
|
"time 0.3.17",
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -551,7 +551,7 @@ dependencies = [
|
|||||||
"itoa 1.0.4",
|
"itoa 1.0.4",
|
||||||
"num-integer",
|
"num-integer",
|
||||||
"ryu",
|
"ryu",
|
||||||
"time 0.3.16",
|
"time 0.3.17",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -610,12 +610,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum"
|
name = "axum"
|
||||||
version = "0.6.0-rc.2"
|
version = "0.6.0-rc.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d2628a243073c55aef15a1c1fe45c87f21b84f9e89ca9e7b262a180d3d03543d"
|
checksum = "11ce1fe515f70a98649f95d9434e8ad2ce8d581b5c9763a15470da5f6ef2e481"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"axum-core 0.3.0-rc.2",
|
"axum-core 0.3.0-rc.3",
|
||||||
"base64",
|
"base64",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
@ -632,6 +632,7 @@ dependencies = [
|
|||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
|
"serde_path_to_error",
|
||||||
"serde_urlencoded",
|
"serde_urlencoded",
|
||||||
"sha-1",
|
"sha-1",
|
||||||
"sync_wrapper",
|
"sync_wrapper",
|
||||||
@ -661,9 +662,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-core"
|
name = "axum-core"
|
||||||
version = "0.3.0-rc.2"
|
version = "0.3.0-rc.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "473bd0762170028bb6b5068be9e97de2a9f0af3bf2084498d840498f47194d3d"
|
checksum = "5d1aa274f0599e5100cbc24e1f184d437d8086ea0bba0b5f68326e2ad5a48567"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
@ -677,11 +678,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-extra"
|
name = "axum-extra"
|
||||||
version = "0.4.0-rc.1"
|
version = "0.4.0-rc.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "090ae29ae83a40882fb99bce421d8dce4a819325a013bb301dad4cc4b74ab40c"
|
checksum = "fa4236821ba5932aa38a08a45e4068ff2318c2882672c30ff26a433bc84b14e6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum 0.6.0-rc.2",
|
"axum 0.6.0-rc.4",
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
"cookie",
|
"cookie",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -697,9 +698,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-macros"
|
name = "axum-macros"
|
||||||
version = "0.3.0-rc.1"
|
version = "0.3.0-rc.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "247a599903eb2e02abbaf2facc6396140df7af6dcc84e64ce3b71d117702fa22"
|
checksum = "414ca6cd8cbe767411488373833ebd9d07a6b470d841250d8d2b8bd69769ca0e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck",
|
"heck",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@ -742,9 +743,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blake2"
|
name = "blake2"
|
||||||
version = "0.10.4"
|
version = "0.10.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b9cf849ee05b2ee5fba5e36f97ff8ec2533916700fc0758d40d92136a42f3388"
|
checksum = "b12e5fd123190ce1c2e559308a94c9bacad77907d4c6005d9e58fe1a0689e55e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"digest 0.10.6",
|
"digest 0.10.6",
|
||||||
]
|
]
|
||||||
@ -870,9 +871,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.0.74"
|
version = "1.0.76"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "581f5dba903aac52ea3feb5ec4810848460ee833876f1f9b0fdeab1f19091574"
|
checksum = "76a284da2e6fe2092f2353e51713435363112dfd60030e22add80be333fb928f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jobserver",
|
"jobserver",
|
||||||
]
|
]
|
||||||
@ -1044,7 +1045,7 @@ dependencies = [
|
|||||||
"rand",
|
"rand",
|
||||||
"sha2 0.10.6",
|
"sha2 0.10.6",
|
||||||
"subtle",
|
"subtle",
|
||||||
"time 0.3.16",
|
"time 0.3.17",
|
||||||
"version_check",
|
"version_check",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1289,9 +1290,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxx"
|
name = "cxx"
|
||||||
version = "1.0.80"
|
version = "1.0.82"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a"
|
checksum = "d4a41a86530d0fe7f5d9ea779916b7cadd2d4f9add748b99c2c029cbbdfaf453"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"cxxbridge-flags",
|
"cxxbridge-flags",
|
||||||
@ -1301,9 +1302,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxx-build"
|
name = "cxx-build"
|
||||||
version = "1.0.80"
|
version = "1.0.82"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827"
|
checksum = "06416d667ff3e3ad2df1cd8cd8afae5da26cf9cec4d0825040f88b5ca659a2f0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"codespan-reporting",
|
"codespan-reporting",
|
||||||
@ -1316,15 +1317,15 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxxbridge-flags"
|
name = "cxxbridge-flags"
|
||||||
version = "1.0.80"
|
version = "1.0.82"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a"
|
checksum = "820a9a2af1669deeef27cb271f476ffd196a2c4b6731336011e0ba63e2c7cf71"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cxxbridge-macro"
|
name = "cxxbridge-macro"
|
||||||
version = "1.0.80"
|
version = "1.0.82"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7"
|
checksum = "a08a6e2fcc370a089ad3b4aaf54db3b1b4cee38ddabce5896b33eb693275f470"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -1376,7 +1377,7 @@ dependencies = [
|
|||||||
"hashbrown",
|
"hashbrown",
|
||||||
"lock_api",
|
"lock_api",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"parking_lot_core",
|
"parking_lot_core 0.9.4",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1558,9 +1559,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "env_logger"
|
name = "env_logger"
|
||||||
version = "0.9.1"
|
version = "0.9.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272"
|
checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"atty",
|
||||||
"humantime",
|
"humantime",
|
||||||
@ -1637,7 +1638,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9"
|
checksum = "4e56602b469b2201400dec66a66aec5a9b8761ee97cd1b8c96ab2483fcc16cc9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomic",
|
"atomic",
|
||||||
"parking_lot",
|
"parking_lot 0.12.1",
|
||||||
"pear",
|
"pear",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
@ -1737,13 +1738,13 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futures-intrusive"
|
name = "futures-intrusive"
|
||||||
version = "0.4.1"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1b6bdbb8c5a42b2bb5ee8dd9dc2c7d73ce3e15d26dfe100fb347ffa3f58c672b"
|
checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"lock_api",
|
"lock_api",
|
||||||
"parking_lot",
|
"parking_lot 0.11.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2177,9 +2178,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.9.1"
|
version = "1.9.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
|
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
@ -2239,9 +2240,9 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "io-lifetimes"
|
name = "io-lifetimes"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e6e481ccbe3dea62107216d0d1138bb8ad8e5e5c43009a098bd1990272c497b0"
|
checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iovec"
|
name = "iovec"
|
||||||
@ -2254,9 +2255,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ipnet"
|
name = "ipnet"
|
||||||
version = "2.5.0"
|
version = "2.5.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b"
|
checksum = "f88c5561171189e69df9d98bcf18fd5f9558300f7ea7b801eb8a0fd748bd8745"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iri-string"
|
name = "iri-string"
|
||||||
@ -2385,9 +2386,9 @@ checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libm"
|
name = "libm"
|
||||||
version = "0.2.5"
|
version = "0.2.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "292a948cd991e376cf75541fe5b97a1081d713c618b4f1b9500f8844e49eb565"
|
checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "link-cplusplus"
|
name = "link-cplusplus"
|
||||||
@ -2460,7 +2461,7 @@ name = "mas-axum-utils"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"axum 0.6.0-rc.2",
|
"axum 0.6.0-rc.4",
|
||||||
"axum-extra",
|
"axum-extra",
|
||||||
"bincode",
|
"bincode",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -2498,7 +2499,7 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"argon2",
|
"argon2",
|
||||||
"atty",
|
"atty",
|
||||||
"axum 0.6.0-rc.2",
|
"axum 0.6.0-rc.4",
|
||||||
"clap",
|
"clap",
|
||||||
"dotenv",
|
"dotenv",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@ -2630,7 +2631,7 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"argon2",
|
"argon2",
|
||||||
"async-graphql",
|
"async-graphql",
|
||||||
"axum 0.6.0-rc.2",
|
"axum 0.6.0-rc.4",
|
||||||
"axum-extra",
|
"axum-extra",
|
||||||
"axum-macros",
|
"axum-macros",
|
||||||
"chrono",
|
"chrono",
|
||||||
@ -2676,7 +2677,7 @@ dependencies = [
|
|||||||
"anyhow",
|
"anyhow",
|
||||||
"aws-smithy-http",
|
"aws-smithy-http",
|
||||||
"aws-types",
|
"aws-types",
|
||||||
"axum 0.6.0-rc.2",
|
"axum 0.6.0-rc.4",
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"headers",
|
"headers",
|
||||||
@ -2833,7 +2834,7 @@ dependencies = [
|
|||||||
name = "mas-router"
|
name = "mas-router"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum 0.6.0-rc.2",
|
"axum 0.6.0-rc.4",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_urlencoded",
|
"serde_urlencoded",
|
||||||
"serde_with",
|
"serde_with",
|
||||||
@ -2860,7 +2861,7 @@ dependencies = [
|
|||||||
name = "mas-static-files"
|
name = "mas-static-files"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum 0.6.0-rc.2",
|
"axum 0.6.0-rc.4",
|
||||||
"headers",
|
"headers",
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
@ -3123,23 +3124,14 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num_cpus"
|
name = "num_cpus"
|
||||||
version = "1.13.1"
|
version = "1.14.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
|
checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hermit-abi",
|
"hermit-abi",
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num_threads"
|
|
||||||
version = "0.1.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "oauth2-types"
|
name = "oauth2-types"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
@ -3384,9 +3376,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "os_str_bytes"
|
name = "os_str_bytes"
|
||||||
version = "6.3.1"
|
version = "6.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3baf96e39c5359d2eb0dd6ccb42c62b91d9678aa68160d261b9e0ccbf9e9dea9"
|
checksum = "7b5bf27447411e9ee3ff51186bf7a08e16c341efdde93f4d823e8844429bed7e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "overload"
|
name = "overload"
|
||||||
@ -3416,6 +3408,17 @@ dependencies = [
|
|||||||
"sha2 0.10.6",
|
"sha2 0.10.6",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parking_lot"
|
||||||
|
version = "0.11.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
|
||||||
|
dependencies = [
|
||||||
|
"instant",
|
||||||
|
"lock_api",
|
||||||
|
"parking_lot_core 0.8.5",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "parking_lot"
|
name = "parking_lot"
|
||||||
version = "0.12.1"
|
version = "0.12.1"
|
||||||
@ -3423,7 +3426,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
|
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"lock_api",
|
"lock_api",
|
||||||
"parking_lot_core",
|
"parking_lot_core 0.9.4",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parking_lot_core"
|
||||||
|
version = "0.8.5"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"instant",
|
||||||
|
"libc",
|
||||||
|
"redox_syscall",
|
||||||
|
"smallvec",
|
||||||
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3546,9 +3563,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest"
|
name = "pest"
|
||||||
version = "2.4.0"
|
version = "2.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dbc7bc69c062e492337d74d59b120c274fd3d261b6bf6d3207d499b4b379c41a"
|
checksum = "a528564cc62c19a7acac4d81e01f39e53e25e17b934878f4c6d25cc2836e62f8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"ucd-trie",
|
"ucd-trie",
|
||||||
@ -3556,9 +3573,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest_derive"
|
name = "pest_derive"
|
||||||
version = "2.4.0"
|
version = "2.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "60b75706b9642ebcb34dab3bc7750f811609a0eb1dd8b88c2d15bf628c1c65b2"
|
checksum = "d5fd9bc6500181952d34bd0b2b0163a54d794227b498be0b7afa7698d0a7b18f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pest",
|
"pest",
|
||||||
"pest_generator",
|
"pest_generator",
|
||||||
@ -3566,9 +3583,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest_generator"
|
name = "pest_generator"
|
||||||
version = "2.4.0"
|
version = "2.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f4f9272122f5979a6511a749af9db9bfc810393f63119970d7085fed1c4ea0db"
|
checksum = "d2610d5ac5156217b4ff8e46ddcef7cdf44b273da2ac5bca2ecbfa86a330e7c4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pest",
|
"pest",
|
||||||
"pest_meta",
|
"pest_meta",
|
||||||
@ -3579,9 +3596,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pest_meta"
|
name = "pest_meta"
|
||||||
version = "2.4.0"
|
version = "2.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4c8717927f9b79515e565a64fe46c38b8cd0427e64c40680b14a7365ab09ac8d"
|
checksum = "824749bf7e21dd66b36fbe26b3f45c713879cccd4a009a917ab8e045ca8246fe"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"pest",
|
"pest",
|
||||||
@ -3734,9 +3751,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ppv-lite86"
|
name = "ppv-lite86"
|
||||||
version = "0.2.16"
|
version = "0.2.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
|
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prettyplease"
|
name = "prettyplease"
|
||||||
@ -3815,16 +3832,16 @@ dependencies = [
|
|||||||
"fnv",
|
"fnv",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"memchr",
|
"memchr",
|
||||||
"parking_lot",
|
"parking_lot 0.12.1",
|
||||||
"protobuf",
|
"protobuf",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prost"
|
name = "prost"
|
||||||
version = "0.11.0"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
|
checksum = "a0841812012b2d4a6145fae9a6af1534873c32aa67fff26bd09f8fa42c83f95a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
"prost-derive",
|
"prost-derive",
|
||||||
@ -3832,9 +3849,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prost-build"
|
name = "prost-build"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb"
|
checksum = "1d8b442418ea0822409d9e7d047cbf1e7e9e1760b172bf9982cf29d517c93511"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
"heck",
|
"heck",
|
||||||
@ -3843,18 +3860,20 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"multimap",
|
"multimap",
|
||||||
"petgraph",
|
"petgraph",
|
||||||
|
"prettyplease",
|
||||||
"prost",
|
"prost",
|
||||||
"prost-types",
|
"prost-types",
|
||||||
"regex",
|
"regex",
|
||||||
|
"syn",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"which",
|
"which",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prost-derive"
|
name = "prost-derive"
|
||||||
version = "0.11.0"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
|
checksum = "164ae68b6587001ca506d3bf7f1000bfa248d0e1217b618108fba4ec1d0cc306"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"itertools",
|
"itertools",
|
||||||
@ -3865,9 +3884,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "prost-types"
|
name = "prost-types"
|
||||||
version = "0.11.1"
|
version = "0.11.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e"
|
checksum = "747761bc3dc48f9a34553bf65605cf6cb6288ba219f3450b4275dbd81539551a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
"prost",
|
"prost",
|
||||||
@ -3967,9 +3986,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex"
|
name = "regex"
|
||||||
version = "1.6.0"
|
version = "1.7.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b"
|
checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"memchr",
|
"memchr",
|
||||||
@ -3987,9 +4006,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "regex-syntax"
|
name = "regex-syntax"
|
||||||
version = "0.6.27"
|
version = "0.6.28"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244"
|
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "remove_dir_all"
|
name = "remove_dir_all"
|
||||||
@ -4002,9 +4021,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.11.12"
|
version = "0.11.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc"
|
checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"bytes 1.2.1",
|
"bytes 1.2.1",
|
||||||
@ -4041,9 +4060,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rfc6979"
|
name = "rfc6979"
|
||||||
version = "0.3.0"
|
version = "0.3.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "88c86280f057430a52f4861551b092a01b419b8eacefc7c995eacb9dc132fe32"
|
checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crypto-bigint",
|
"crypto-bigint",
|
||||||
"hmac",
|
"hmac",
|
||||||
@ -4137,16 +4156,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.35.12"
|
version = "0.35.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "985947f9b6423159c4726323f373be0a21bdb514c5af06a849cb3d2dce2d01e8"
|
checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags",
|
"bitflags",
|
||||||
"errno",
|
"errno",
|
||||||
"io-lifetimes",
|
"io-lifetimes",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys",
|
"linux-raw-sys",
|
||||||
"windows-sys 0.36.1",
|
"windows-sys 0.42.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4365,15 +4384,24 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_json"
|
name = "serde_json"
|
||||||
version = "1.0.87"
|
version = "1.0.88"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45"
|
checksum = "8e8b3801309262e8184d9687fb697586833e939767aea0dda89f5a8e650e8bd7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa 1.0.4",
|
"itoa 1.0.4",
|
||||||
"ryu",
|
"ryu",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_path_to_error"
|
||||||
|
version = "0.1.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "184c643044780f7ceb59104cef98a5a6f12cb2288a7bc701ab93a362b49fd47d"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_urlencoded"
|
name = "serde_urlencoded"
|
||||||
version = "0.7.1"
|
version = "0.7.1"
|
||||||
@ -4399,7 +4427,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_with_macros",
|
"serde_with_macros",
|
||||||
"time 0.3.16",
|
"time 0.3.17",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -4503,9 +4531,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "similar"
|
name = "similar"
|
||||||
version = "2.2.0"
|
version = "2.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803"
|
checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
@ -4766,9 +4794,9 @@ checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "target-lexicon"
|
name = "target-lexicon"
|
||||||
version = "0.12.4"
|
version = "0.12.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c02424087780c9b71cc96799eaeddff35af2bc513278cda5c99fc1f5d026d3c1"
|
checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
@ -4889,13 +4917,11 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time"
|
name = "time"
|
||||||
version = "0.3.16"
|
version = "0.3.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0fab5c8b9980850e06d92ddbe3ab839c062c801f3927c0fb8abd6fc8e918fbca"
|
checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itoa 1.0.4",
|
"itoa 1.0.4",
|
||||||
"libc",
|
|
||||||
"num_threads",
|
|
||||||
"serde",
|
"serde",
|
||||||
"time-core",
|
"time-core",
|
||||||
"time-macros",
|
"time-macros",
|
||||||
@ -4909,9 +4935,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "time-macros"
|
name = "time-macros"
|
||||||
version = "0.2.5"
|
version = "0.2.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "65bb801831d812c562ae7d2bfb531f26e66e4e1f6b17307ba4149c5064710e5b"
|
checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"time-core",
|
"time-core",
|
||||||
]
|
]
|
||||||
@ -4943,7 +4969,7 @@ dependencies = [
|
|||||||
"memchr",
|
"memchr",
|
||||||
"mio",
|
"mio",
|
||||||
"num_cpus",
|
"num_cpus",
|
||||||
"parking_lot",
|
"parking_lot 0.12.1",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"signal-hook-registry",
|
"signal-hook-registry",
|
||||||
"socket2",
|
"socket2",
|
||||||
@ -5183,7 +5209,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e"
|
checksum = "09d48f71a791638519505cefafe162606f706c25592e4bde4d97600c0195312e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"time 0.3.16",
|
"time 0.3.17",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -5486,9 +5512,9 @@ checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "uuid"
|
name = "uuid"
|
||||||
version = "1.2.1"
|
version = "1.2.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83"
|
checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "valuable"
|
name = "valuable"
|
||||||
|
@ -7,8 +7,8 @@ license = "Apache-2.0"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1.58"
|
async-trait = "0.1.58"
|
||||||
axum = { version = "0.6.0-rc.2", features = ["headers"] }
|
axum = { version = "0.6.0-rc.4", features = ["headers"] }
|
||||||
axum-extra = { version = "0.4.0-rc.1", features = ["cookie-private"] }
|
axum-extra = { version = "0.4.0-rc.2", features = ["cookie-private"] }
|
||||||
bincode = "1.3.3"
|
bincode = "1.3.3"
|
||||||
chrono = "0.4.23"
|
chrono = "0.4.23"
|
||||||
data-encoding = "2.3.2"
|
data-encoding = "2.3.2"
|
||||||
@ -21,7 +21,7 @@ rand = "0.8.5"
|
|||||||
serde = "1.0.147"
|
serde = "1.0.147"
|
||||||
serde_with = "2.1.0"
|
serde_with = "2.1.0"
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
sqlx = "0.6.2"
|
sqlx = "0.6.2"
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.37"
|
||||||
tokio = "1.21.2"
|
tokio = "1.21.2"
|
||||||
|
@ -18,7 +18,7 @@ use async_trait::async_trait;
|
|||||||
use axum::{
|
use axum::{
|
||||||
body::HttpBody,
|
body::HttpBody,
|
||||||
extract::{
|
extract::{
|
||||||
rejection::{FailedToDeserializeQueryString, FormRejection, TypedHeaderRejectionReason},
|
rejection::{FailedToDeserializeForm, FormRejection, TypedHeaderRejectionReason},
|
||||||
Form, FromRequest, FromRequestParts, TypedHeader,
|
Form, FromRequest, FromRequestParts, TypedHeader,
|
||||||
},
|
},
|
||||||
response::IntoResponse,
|
response::IntoResponse,
|
||||||
@ -217,7 +217,7 @@ pub struct ClientAuthorization<F = ()> {
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum ClientAuthorizationError {
|
pub enum ClientAuthorizationError {
|
||||||
InvalidHeader,
|
InvalidHeader,
|
||||||
BadForm(FailedToDeserializeQueryString),
|
BadForm(FailedToDeserializeForm),
|
||||||
ClientIdMismatch { credential: String, form: String },
|
ClientIdMismatch { credential: String, form: String },
|
||||||
UnsupportedClientAssertion { client_assertion_type: String },
|
UnsupportedClientAssertion { client_assertion_type: String },
|
||||||
MissingCredentials,
|
MissingCredentials,
|
||||||
@ -284,7 +284,7 @@ where
|
|||||||
// If it is not a form, continue
|
// If it is not a form, continue
|
||||||
Err(FormRejection::InvalidFormContentType(_err)) => (None, None, None, None, None),
|
Err(FormRejection::InvalidFormContentType(_err)) => (None, None, None, None, None),
|
||||||
// If the form could not be read, return a Bad Request error
|
// If the form could not be read, return a Bad Request error
|
||||||
Err(FormRejection::FailedToDeserializeQueryString(err)) => {
|
Err(FormRejection::FailedToDeserializeForm(err)) => {
|
||||||
return Err(ClientAuthorizationError::BadForm(err))
|
return Err(ClientAuthorizationError::BadForm(err))
|
||||||
}
|
}
|
||||||
// Other errors (body read twice, byte stream broke) return an internal error
|
// Other errors (body read twice, byte stream broke) return an internal error
|
||||||
|
@ -18,7 +18,7 @@ use async_trait::async_trait;
|
|||||||
use axum::{
|
use axum::{
|
||||||
body::HttpBody,
|
body::HttpBody,
|
||||||
extract::{
|
extract::{
|
||||||
rejection::{FailedToDeserializeQueryString, FormRejection, TypedHeaderRejectionReason},
|
rejection::{FailedToDeserializeForm, FormRejection, TypedHeaderRejectionReason},
|
||||||
Form, FromRequest, FromRequestParts, TypedHeader,
|
Form, FromRequest, FromRequestParts, TypedHeader,
|
||||||
},
|
},
|
||||||
response::{IntoResponse, Response},
|
response::{IntoResponse, Response},
|
||||||
@ -109,7 +109,7 @@ impl<F: Send> UserAuthorization<F> {
|
|||||||
pub enum UserAuthorizationError {
|
pub enum UserAuthorizationError {
|
||||||
InvalidHeader,
|
InvalidHeader,
|
||||||
TokenInFormAndHeader,
|
TokenInFormAndHeader,
|
||||||
BadForm(FailedToDeserializeQueryString),
|
BadForm(FailedToDeserializeForm),
|
||||||
InternalError(Box<dyn Error>),
|
InternalError(Box<dyn Error>),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,7 +311,7 @@ where
|
|||||||
// If it is not a form, continue
|
// If it is not a form, continue
|
||||||
Err(FormRejection::InvalidFormContentType(_err)) => (None, None),
|
Err(FormRejection::InvalidFormContentType(_err)) => (None, None),
|
||||||
// If the form could not be read, return a Bad Request error
|
// If the form could not be read, return a Bad Request error
|
||||||
Err(FormRejection::FailedToDeserializeQueryString(err)) => {
|
Err(FormRejection::FailedToDeserializeForm(err)) => {
|
||||||
return Err(UserAuthorizationError::BadForm(err))
|
return Err(UserAuthorizationError::BadForm(err))
|
||||||
}
|
}
|
||||||
// Other errors (body read twice, byte stream broke) return an internal error
|
// Other errors (body read twice, byte stream broke) return an internal error
|
||||||
|
@ -9,7 +9,7 @@ license = "Apache-2.0"
|
|||||||
anyhow = "1.0.66"
|
anyhow = "1.0.66"
|
||||||
argon2 = { version = "0.4.1", features = ["password-hash"] }
|
argon2 = { version = "0.4.1", features = ["password-hash"] }
|
||||||
atty = "0.2.14"
|
atty = "0.2.14"
|
||||||
axum = "0.6.0-rc.2"
|
axum = "0.6.0-rc.4"
|
||||||
clap = { version = "4.0.26", features = ["derive"] }
|
clap = { version = "4.0.26", features = ["derive"] }
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
futures-util = "0.3.25"
|
futures-util = "0.3.25"
|
||||||
@ -19,7 +19,7 @@ listenfd = "1.0.0"
|
|||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
rand_chacha = "0.3.1"
|
rand_chacha = "0.3.1"
|
||||||
rustls = "0.20.7"
|
rustls = "0.20.7"
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
serde_yaml = "0.9.14"
|
serde_yaml = "0.9.14"
|
||||||
tokio = { version = "1.21.2", features = ["full"] }
|
tokio = { version = "1.21.2", features = ["full"] }
|
||||||
tower = { version = "0.4.13", features = ["full"] }
|
tower = { version = "0.4.13", features = ["full"] }
|
||||||
|
@ -205,7 +205,7 @@ impl Options {
|
|||||||
|
|
||||||
let graphql_schema = mas_handlers::graphql_schema(&pool);
|
let graphql_schema = mas_handlers::graphql_schema(&pool);
|
||||||
|
|
||||||
let state = Arc::new(AppState {
|
let state = AppState {
|
||||||
pool,
|
pool,
|
||||||
templates,
|
templates,
|
||||||
key_store,
|
key_store,
|
||||||
@ -215,7 +215,7 @@ impl Options {
|
|||||||
homeserver,
|
homeserver,
|
||||||
policy_factory,
|
policy_factory,
|
||||||
graphql_schema,
|
graphql_schema,
|
||||||
});
|
};
|
||||||
|
|
||||||
let mut fd_manager = listenfd::ListenFd::from_env();
|
let mut fd_manager = listenfd::ListenFd::from_env();
|
||||||
|
|
||||||
@ -234,8 +234,9 @@ impl Options {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// and build the router
|
// and build the router
|
||||||
let router = crate::server::build_router(&state, &config.resources)
|
let router = crate::server::build_router(state.clone(), &config.resources)
|
||||||
.layer(ServerLayer::new(config.name.clone()));
|
.layer(ServerLayer::new(config.name.clone()))
|
||||||
|
.into_service();
|
||||||
|
|
||||||
// Display some informations about where we'll be serving connections
|
// Display some informations about where we'll be serving connections
|
||||||
let is_tls = config.tls.is_some();
|
let is_tls = config.tls.is_some();
|
||||||
|
@ -16,11 +16,10 @@ use std::{
|
|||||||
future::ready,
|
future::ready,
|
||||||
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, TcpListener, ToSocketAddrs},
|
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, TcpListener, ToSocketAddrs},
|
||||||
os::unix::net::UnixListener,
|
os::unix::net::UnixListener,
|
||||||
sync::Arc,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use axum::{body::HttpBody, error_handling::HandleErrorLayer, Extension, Router};
|
use axum::{body::HttpBody, error_handling::HandleErrorLayer, extract::FromRef, Extension, Router};
|
||||||
use hyper::StatusCode;
|
use hyper::StatusCode;
|
||||||
use listenfd::ListenFd;
|
use listenfd::ListenFd;
|
||||||
use mas_config::{HttpBindConfig, HttpResource, HttpTlsConfig, UnixOrTcp};
|
use mas_config::{HttpBindConfig, HttpResource, HttpTlsConfig, UnixOrTcp};
|
||||||
@ -28,45 +27,47 @@ use mas_handlers::AppState;
|
|||||||
use mas_listener::{unix_or_tcp::UnixOrTcpListener, ConnectionInfo};
|
use mas_listener::{unix_or_tcp::UnixOrTcpListener, ConnectionInfo};
|
||||||
use mas_router::Route;
|
use mas_router::Route;
|
||||||
use mas_spa::ViteManifestService;
|
use mas_spa::ViteManifestService;
|
||||||
|
use mas_templates::Templates;
|
||||||
use rustls::ServerConfig;
|
use rustls::ServerConfig;
|
||||||
use tower::Layer;
|
use tower::Layer;
|
||||||
use tower_http::services::ServeDir;
|
use tower_http::services::ServeDir;
|
||||||
|
|
||||||
#[allow(clippy::trait_duplication_in_bounds)]
|
#[allow(clippy::trait_duplication_in_bounds)]
|
||||||
pub fn build_router<B>(state: &Arc<AppState>, resources: &[HttpResource]) -> Router<AppState, B>
|
pub fn build_router<B>(state: AppState, resources: &[HttpResource]) -> Router<AppState, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
<B as HttpBody>::Data: Into<axum::body::Bytes> + Send,
|
<B as HttpBody>::Data: Into<axum::body::Bytes> + Send,
|
||||||
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
||||||
{
|
{
|
||||||
let mut router = Router::with_state_arc(state.clone());
|
let templates = Templates::from_ref(&state);
|
||||||
|
let mut router = Router::with_state(state);
|
||||||
|
|
||||||
for resource in resources {
|
for resource in resources {
|
||||||
router = match resource {
|
router = match resource {
|
||||||
mas_config::HttpResource::Health => {
|
mas_config::HttpResource::Health => {
|
||||||
router.merge(mas_handlers::healthcheck_router(state.clone()))
|
router.merge(mas_handlers::healthcheck_router::<AppState, B>())
|
||||||
}
|
}
|
||||||
mas_config::HttpResource::Prometheus => {
|
mas_config::HttpResource::Prometheus => {
|
||||||
router.route_service("/metrics", crate::telemetry::prometheus_service())
|
router.route_service("/metrics", crate::telemetry::prometheus_service())
|
||||||
}
|
}
|
||||||
mas_config::HttpResource::Discovery => {
|
mas_config::HttpResource::Discovery => {
|
||||||
router.merge(mas_handlers::discovery_router(state.clone()))
|
router.merge(mas_handlers::discovery_router::<AppState, B>())
|
||||||
}
|
}
|
||||||
mas_config::HttpResource::Human => {
|
mas_config::HttpResource::Human => {
|
||||||
router.merge(mas_handlers::human_router(state.clone()))
|
router.merge(mas_handlers::human_router::<AppState, B>(templates.clone()))
|
||||||
}
|
}
|
||||||
mas_config::HttpResource::GraphQL { playground } => {
|
mas_config::HttpResource::GraphQL { playground } => {
|
||||||
router.merge(mas_handlers::graphql_router(state.clone(), *playground))
|
router.merge(mas_handlers::graphql_router::<AppState, B>(*playground))
|
||||||
}
|
}
|
||||||
mas_config::HttpResource::Static { web_root } => {
|
mas_config::HttpResource::Static { web_root } => {
|
||||||
let handler = mas_static_files::service(web_root);
|
let handler = mas_static_files::service(web_root);
|
||||||
router.nest(mas_router::StaticAsset::route(), handler)
|
router.nest_service(mas_router::StaticAsset::route(), handler)
|
||||||
}
|
}
|
||||||
mas_config::HttpResource::OAuth => {
|
mas_config::HttpResource::OAuth => {
|
||||||
router.merge(mas_handlers::api_router(state.clone()))
|
router.merge(mas_handlers::api_router::<AppState, B>())
|
||||||
}
|
}
|
||||||
mas_config::HttpResource::Compat => {
|
mas_config::HttpResource::Compat => {
|
||||||
router.merge(mas_handlers::compat_router(state.clone()))
|
router.merge(mas_handlers::compat_router::<AppState, B>())
|
||||||
}
|
}
|
||||||
// TODO: do a better handler here
|
// TODO: do a better handler here
|
||||||
mas_config::HttpResource::ConnectionInfo => router.route(
|
mas_config::HttpResource::ConnectionInfo => router.route(
|
||||||
@ -99,8 +100,8 @@ where
|
|||||||
let static_service = ServeDir::new(assets).append_index_html_on_directories(false);
|
let static_service = ServeDir::new(assets).append_index_html_on_directories(false);
|
||||||
|
|
||||||
router
|
router
|
||||||
.nest(app_base, error_layer.layer(index_service))
|
.nest_service(app_base, error_layer.layer(index_service))
|
||||||
.nest(assets_base, error_layer.layer(static_service))
|
.nest_service(assets_base, error_layer.layer(static_service))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ ulid = { version = "1.0.0", features = ["serde"] }
|
|||||||
|
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_with = { version = "2.1.0", features = ["hex", "chrono"] }
|
serde_with = { version = "2.1.0", features = ["hex", "chrono"] }
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
sqlx = { version = "0.6.2", features = ["runtime-tokio-rustls", "postgres"] }
|
sqlx = { version = "0.6.2", features = ["runtime-tokio-rustls", "postgres"] }
|
||||||
lettre = { version = "0.10.1", default-features = false, features = ["serde", "builder"] }
|
lettre = { version = "0.10.1", default-features = false, features = ["serde", "builder"] }
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@ anyhow = "1.0.66"
|
|||||||
hyper = { version = "0.14.23", features = ["full"] }
|
hyper = { version = "0.14.23", features = ["full"] }
|
||||||
tower = "0.4.13"
|
tower = "0.4.13"
|
||||||
tower-http = { version = "0.3.4", features = ["cors"] }
|
tower-http = { version = "0.3.4", features = ["cors"] }
|
||||||
axum = { version = "0.6.0-rc.2", features = ["ws"] }
|
axum = { version = "0.6.0-rc.4", features = ["ws"] }
|
||||||
axum-macros = "0.3.0-rc.1"
|
axum-macros = "0.3.0-rc.2"
|
||||||
axum-extra = { version = "0.4.0-rc.1", features = ["cookie-private"] }
|
axum-extra = { version = "0.4.0-rc.2", features = ["cookie-private"] }
|
||||||
|
|
||||||
async-graphql = { version = "4.0.16", features = ["tracing", "apollo_tracing"] }
|
async-graphql = { version = "4.0.16", features = ["tracing", "apollo_tracing"] }
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ sqlx = { version = "0.6.2", features = ["runtime-tokio-rustls", "postgres"] }
|
|||||||
# Various structure (de)serialization
|
# Various structure (de)serialization
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_with = { version = "2.1.0", features = ["hex", "chrono"] }
|
serde_with = { version = "2.1.0", features = ["hex", "chrono"] }
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
|
|
||||||
# Password hashing
|
# Password hashing
|
||||||
|
@ -39,7 +39,7 @@ mod tests {
|
|||||||
#[sqlx::test(migrator = "mas_storage::MIGRATOR")]
|
#[sqlx::test(migrator = "mas_storage::MIGRATOR")]
|
||||||
async fn test_get_health(pool: PgPool) -> Result<(), anyhow::Error> {
|
async fn test_get_health(pool: PgPool) -> Result<(), anyhow::Error> {
|
||||||
let state = crate::test_state(pool).await?;
|
let state = crate::test_state(pool).await?;
|
||||||
let app = crate::router(state);
|
let app = crate::router(state).into_service();
|
||||||
|
|
||||||
let request = Request::builder().uri("/health").body(Body::empty())?;
|
let request = Request::builder().uri("/health").body(Body::empty())?;
|
||||||
|
|
||||||
|
@ -59,35 +59,35 @@ pub use compat::MatrixHomeserver;
|
|||||||
pub use self::{app_state::AppState, graphql::schema as graphql_schema};
|
pub use self::{app_state::AppState, graphql::schema as graphql_schema};
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn empty_router<S, B>(state: Arc<S>) -> Router<S, B>
|
pub fn empty_router<S, B>(state: S) -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
{
|
{
|
||||||
Router::with_state_arc(state)
|
Router::with_state(state)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn healthcheck_router<S, B>(state: Arc<S>) -> Router<S, B>
|
pub fn healthcheck_router<S, B>() -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
PgPool: FromRef<S>,
|
PgPool: FromRef<S>,
|
||||||
{
|
{
|
||||||
Router::with_state_arc(state).route(mas_router::Healthcheck::route(), get(self::health::get))
|
Router::inherit_state().route(mas_router::Healthcheck::route(), get(self::health::get))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn graphql_router<S, B>(state: Arc<S>, playground: bool) -> Router<S, B>
|
pub fn graphql_router<S, B>(playground: bool) -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
<B as HttpBody>::Data: Into<Bytes>,
|
<B as HttpBody>::Data: Into<Bytes>,
|
||||||
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
mas_graphql::Schema: FromRef<S>,
|
mas_graphql::Schema: FromRef<S>,
|
||||||
Encrypter: FromRef<S>,
|
Encrypter: FromRef<S>,
|
||||||
{
|
{
|
||||||
let mut router = Router::with_state_arc(state)
|
let mut router = Router::inherit_state()
|
||||||
.route(
|
.route(
|
||||||
"/graphql",
|
"/graphql",
|
||||||
get(self::graphql::get).post(self::graphql::post),
|
get(self::graphql::get).post(self::graphql::post),
|
||||||
@ -102,14 +102,14 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn discovery_router<S, B>(state: Arc<S>) -> Router<S, B>
|
pub fn discovery_router<S, B>() -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
Keystore: FromRef<S>,
|
Keystore: FromRef<S>,
|
||||||
UrlBuilder: FromRef<S>,
|
UrlBuilder: FromRef<S>,
|
||||||
{
|
{
|
||||||
Router::with_state_arc(state)
|
Router::inherit_state()
|
||||||
.route(
|
.route(
|
||||||
mas_router::OidcConfiguration::route(),
|
mas_router::OidcConfiguration::route(),
|
||||||
get(self::oauth2::discovery::get),
|
get(self::oauth2::discovery::get),
|
||||||
@ -135,12 +135,12 @@ where
|
|||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[allow(clippy::trait_duplication_in_bounds)]
|
#[allow(clippy::trait_duplication_in_bounds)]
|
||||||
pub fn api_router<S, B>(state: Arc<S>) -> Router<S, B>
|
pub fn api_router<S, B>() -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
<B as HttpBody>::Data: Send,
|
<B as HttpBody>::Data: Send,
|
||||||
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
Keystore: FromRef<S>,
|
Keystore: FromRef<S>,
|
||||||
UrlBuilder: FromRef<S>,
|
UrlBuilder: FromRef<S>,
|
||||||
Arc<PolicyFactory>: FromRef<S>,
|
Arc<PolicyFactory>: FromRef<S>,
|
||||||
@ -148,7 +148,7 @@ where
|
|||||||
Encrypter: FromRef<S>,
|
Encrypter: FromRef<S>,
|
||||||
{
|
{
|
||||||
// All those routes are API-like, with a common CORS layer
|
// All those routes are API-like, with a common CORS layer
|
||||||
Router::with_state_arc(state)
|
Router::inherit_state()
|
||||||
.route(
|
.route(
|
||||||
mas_router::OAuth2Keys::route(),
|
mas_router::OAuth2Keys::route(),
|
||||||
get(self::oauth2::keys::get),
|
get(self::oauth2::keys::get),
|
||||||
@ -189,17 +189,17 @@ where
|
|||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[allow(clippy::trait_duplication_in_bounds)]
|
#[allow(clippy::trait_duplication_in_bounds)]
|
||||||
pub fn compat_router<S, B>(state: Arc<S>) -> Router<S, B>
|
pub fn compat_router<S, B>() -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
<B as HttpBody>::Data: Send,
|
<B as HttpBody>::Data: Send,
|
||||||
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
UrlBuilder: FromRef<S>,
|
UrlBuilder: FromRef<S>,
|
||||||
PgPool: FromRef<S>,
|
PgPool: FromRef<S>,
|
||||||
MatrixHomeserver: FromRef<S>,
|
MatrixHomeserver: FromRef<S>,
|
||||||
{
|
{
|
||||||
Router::with_state_arc(state)
|
Router::inherit_state()
|
||||||
.route(
|
.route(
|
||||||
mas_router::CompatLogin::route(),
|
mas_router::CompatLogin::route(),
|
||||||
get(self::compat::login::get).post(self::compat::login::post),
|
get(self::compat::login::get).post(self::compat::login::post),
|
||||||
@ -230,12 +230,12 @@ where
|
|||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[allow(clippy::trait_duplication_in_bounds)]
|
#[allow(clippy::trait_duplication_in_bounds)]
|
||||||
pub fn human_router<S, B>(state: Arc<S>) -> Router<S, B>
|
pub fn human_router<S, B>(templates: Templates) -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
<B as HttpBody>::Data: Send,
|
<B as HttpBody>::Data: Send,
|
||||||
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
UrlBuilder: FromRef<S>,
|
UrlBuilder: FromRef<S>,
|
||||||
Arc<PolicyFactory>: FromRef<S>,
|
Arc<PolicyFactory>: FromRef<S>,
|
||||||
PgPool: FromRef<S>,
|
PgPool: FromRef<S>,
|
||||||
@ -243,8 +243,7 @@ where
|
|||||||
Templates: FromRef<S>,
|
Templates: FromRef<S>,
|
||||||
Mailer: FromRef<S>,
|
Mailer: FromRef<S>,
|
||||||
{
|
{
|
||||||
let templates = Templates::from_ref(&state);
|
Router::inherit_state()
|
||||||
Router::with_state_arc(state)
|
|
||||||
.route(
|
.route(
|
||||||
mas_router::ChangePasswordDiscovery::route(),
|
mas_router::ChangePasswordDiscovery::route(),
|
||||||
get(|| async { mas_router::AccountPassword.go() }),
|
get(|| async { mas_router::AccountPassword.go() }),
|
||||||
@ -327,12 +326,12 @@ where
|
|||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
#[allow(clippy::trait_duplication_in_bounds)]
|
#[allow(clippy::trait_duplication_in_bounds)]
|
||||||
pub fn router<S, B>(state: Arc<S>) -> Router<S, B>
|
pub fn router<S, B>(state: S) -> Router<S, B>
|
||||||
where
|
where
|
||||||
B: HttpBody + Send + 'static,
|
B: HttpBody + Send + 'static,
|
||||||
<B as HttpBody>::Data: Into<Bytes> + Send,
|
<B as HttpBody>::Data: Into<Bytes> + Send,
|
||||||
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
<B as HttpBody>::Error: std::error::Error + Send + Sync,
|
||||||
S: Send + Sync + 'static,
|
S: Clone + Send + Sync + 'static,
|
||||||
Keystore: FromRef<S>,
|
Keystore: FromRef<S>,
|
||||||
UrlBuilder: FromRef<S>,
|
UrlBuilder: FromRef<S>,
|
||||||
Arc<PolicyFactory>: FromRef<S>,
|
Arc<PolicyFactory>: FromRef<S>,
|
||||||
@ -343,14 +342,14 @@ where
|
|||||||
MatrixHomeserver: FromRef<S>,
|
MatrixHomeserver: FromRef<S>,
|
||||||
mas_graphql::Schema: FromRef<S>,
|
mas_graphql::Schema: FromRef<S>,
|
||||||
{
|
{
|
||||||
let healthcheck_router = healthcheck_router(state.clone());
|
let healthcheck_router = healthcheck_router();
|
||||||
let discovery_router = discovery_router(state.clone());
|
let discovery_router = discovery_router();
|
||||||
let api_router = api_router(state.clone());
|
let api_router = api_router();
|
||||||
let graphql_router = graphql_router(state.clone(), true);
|
let graphql_router = graphql_router(true);
|
||||||
let compat_router = compat_router(state.clone());
|
let compat_router = compat_router();
|
||||||
let human_router = human_router(state.clone());
|
let human_router = human_router(Templates::from_ref(&state));
|
||||||
|
|
||||||
Router::with_state_arc(state)
|
Router::with_state(state)
|
||||||
.merge(healthcheck_router)
|
.merge(healthcheck_router)
|
||||||
.merge(discovery_router)
|
.merge(discovery_router)
|
||||||
.merge(human_router)
|
.merge(human_router)
|
||||||
@ -360,7 +359,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
async fn test_state(pool: PgPool) -> Result<Arc<AppState>, anyhow::Error> {
|
async fn test_state(pool: PgPool) -> Result<AppState, anyhow::Error> {
|
||||||
use mas_email::MailTransport;
|
use mas_email::MailTransport;
|
||||||
|
|
||||||
let url_builder = UrlBuilder::new("https://example.com/".parse()?);
|
let url_builder = UrlBuilder::new("https://example.com/".parse()?);
|
||||||
@ -382,7 +381,7 @@ async fn test_state(pool: PgPool) -> Result<Arc<AppState>, anyhow::Error> {
|
|||||||
|
|
||||||
let graphql_schema = graphql_schema(&pool);
|
let graphql_schema = graphql_schema(&pool);
|
||||||
|
|
||||||
Ok(Arc::new(AppState {
|
Ok(AppState {
|
||||||
pool,
|
pool,
|
||||||
templates,
|
templates,
|
||||||
key_store,
|
key_store,
|
||||||
@ -392,7 +391,7 @@ async fn test_state(pool: PgPool) -> Result<Arc<AppState>, anyhow::Error> {
|
|||||||
homeserver,
|
homeserver,
|
||||||
policy_factory,
|
policy_factory,
|
||||||
graphql_schema,
|
graphql_schema,
|
||||||
}))
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// XXX: that should be moved somewhere else
|
// XXX: that should be moved somewhere else
|
||||||
|
@ -8,7 +8,7 @@ license = "Apache-2.0"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
aws-smithy-http = { version = "0.51.0", optional = true }
|
aws-smithy-http = { version = "0.51.0", optional = true }
|
||||||
aws-types = { version = "0.51.0", optional = true }
|
aws-types = { version = "0.51.0", optional = true }
|
||||||
axum = { version = "0.6.0-rc.2", optional = true }
|
axum = { version = "0.6.0-rc.4", optional = true }
|
||||||
bytes = "1.2.1"
|
bytes = "1.2.1"
|
||||||
futures-util = "0.3.25"
|
futures-util = "0.3.25"
|
||||||
headers = "0.3.8"
|
headers = "0.3.8"
|
||||||
@ -23,7 +23,7 @@ opentelemetry-semantic-conventions = "0.10.0"
|
|||||||
rustls = { version = "0.20.7", optional = true }
|
rustls = { version = "0.20.7", optional = true }
|
||||||
rustls-native-certs = { version = "0.6.2", optional = true }
|
rustls-native-certs = { version = "0.6.2", optional = true }
|
||||||
serde = "1.0.147"
|
serde = "1.0.147"
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.37"
|
||||||
tokio = { version = "1.21.2", features = ["sync", "parking_lot"], optional = true }
|
tokio = { version = "1.21.2", features = ["sync", "parking_lot"], optional = true }
|
||||||
|
@ -27,6 +27,15 @@ pub struct ServerLayer<ReqBody> {
|
|||||||
_t: PhantomData<ReqBody>,
|
_t: PhantomData<ReqBody>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<B> Clone for ServerLayer<B> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self {
|
||||||
|
listener_name: self.listener_name.clone(),
|
||||||
|
_t: PhantomData,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<B> ServerLayer<B> {
|
impl<B> ServerLayer<B> {
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn new(listener_name: Option<String>) -> Self {
|
pub fn new(listener_name: Option<String>) -> Self {
|
||||||
|
@ -11,7 +11,7 @@ async-trait = "0.1.58"
|
|||||||
convert_case = "0.6.0"
|
convert_case = "0.6.0"
|
||||||
csv = "1.1.6"
|
csv = "1.1.6"
|
||||||
futures-util = "0.3.25"
|
futures-util = "0.3.25"
|
||||||
reqwest = { version = "0.11.12", features = ["blocking", "rustls-tls"], default-features = false }
|
reqwest = { version = "0.11.13", features = ["blocking", "rustls-tls"], default-features = false }
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
tokio = { version = "1.21.2", features = ["full"] }
|
tokio = { version = "1.21.2", features = ["full"] }
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
|
@ -22,7 +22,7 @@ rsa = "0.7.2"
|
|||||||
schemars = "0.8.11"
|
schemars = "0.8.11"
|
||||||
sec1 = "0.3.0"
|
sec1 = "0.3.0"
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
serde_with = { version = "2.1.0", features = ["base64"] }
|
serde_with = { version = "2.1.0", features = ["base64"] }
|
||||||
sha2 = { version = "0.10.6", features = ["oid"] }
|
sha2 = { version = "0.10.6", features = ["oid"] }
|
||||||
signature = "1.6.4"
|
signature = "1.6.4"
|
||||||
|
@ -8,7 +8,7 @@ license = "Apache-2.0"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
http = "0.2.8"
|
http = "0.2.8"
|
||||||
serde = "1.0.147"
|
serde = "1.0.147"
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
language-tags = { version = "0.3.2", features = ["serde"] }
|
language-tags = { version = "0.3.2", features = ["serde"] }
|
||||||
url = { version = "2.3.1", features = ["serde"] }
|
url = { version = "2.3.1", features = ["serde"] }
|
||||||
parse-display = "0.6.0"
|
parse-display = "0.6.0"
|
||||||
|
@ -9,7 +9,7 @@ license = "Apache-2.0"
|
|||||||
anyhow = "1.0.66"
|
anyhow = "1.0.66"
|
||||||
opa-wasm = { git = "https://github.com/matrix-org/rust-opa-wasm.git" }
|
opa-wasm = { git = "https://github.com/matrix-org/rust-opa-wasm.git" }
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.37"
|
||||||
tokio = { version = "1.21.2", features = ["io-util", "rt"] }
|
tokio = { version = "1.21.2", features = ["io-util", "rt"] }
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
|
@ -6,7 +6,7 @@ edition = "2021"
|
|||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum = { version = "0.6.0-rc.2", default-features = false }
|
axum = { version = "0.6.0-rc.4", default-features = false }
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
serde_with = "2.1.0"
|
serde_with = "2.1.0"
|
||||||
|
@ -7,10 +7,10 @@ license = "Apache-2.0"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.37"
|
||||||
camino = { version = "1.1.1", features = ["serde1"] }
|
camino = { version = "1.1.1", features = ["serde1"] }
|
||||||
headers = "0.3.2"
|
headers = "0.3.8"
|
||||||
http = "0.2.8"
|
http = "0.2.8"
|
||||||
tower-service = "0.3.2"
|
tower-service = "0.3.2"
|
||||||
tower-http = { version = "0.3.4", features = ["fs"] }
|
tower-http = { version = "0.3.4", features = ["fs"] }
|
||||||
|
@ -9,7 +9,7 @@ license = "Apache-2.0"
|
|||||||
dev = []
|
dev = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
axum = { version = "0.6.0-rc.2", features = ["headers"] }
|
axum = { version = "0.6.0-rc.4", features = ["headers"] }
|
||||||
headers = "0.3.8"
|
headers = "0.3.8"
|
||||||
http = "0.2.8"
|
http = "0.2.8"
|
||||||
http-body = "0.4.5"
|
http-body = "0.4.5"
|
||||||
|
@ -10,7 +10,7 @@ tokio = "1.21.2"
|
|||||||
sqlx = { version = "0.6.2", features = ["runtime-tokio-rustls", "postgres", "migrate", "chrono", "offline", "json", "uuid"] }
|
sqlx = { version = "0.6.2", features = ["runtime-tokio-rustls", "postgres", "migrate", "chrono", "offline", "json", "uuid"] }
|
||||||
chrono = { version = "0.4.23", features = ["serde"] }
|
chrono = { version = "0.4.23", features = ["serde"] }
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.37"
|
||||||
anyhow = "1.0.66"
|
anyhow = "1.0.66"
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
@ -21,7 +21,7 @@ password-hash = { version = "0.4.2", features = ["std"] }
|
|||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
rand_chacha = "0.3.1"
|
rand_chacha = "0.3.1"
|
||||||
url = { version = "2.3.1", features = ["serde"] }
|
url = { version = "2.3.1", features = ["serde"] }
|
||||||
uuid = "1.2.1"
|
uuid = "1.2.2"
|
||||||
ulid = { version = "1.0.0", features = ["uuid", "serde"] }
|
ulid = { version = "1.0.0", features = ["uuid", "serde"] }
|
||||||
|
|
||||||
oauth2-types = { path = "../oauth2-types" }
|
oauth2-types = { path = "../oauth2-types" }
|
||||||
|
@ -17,7 +17,7 @@ thiserror = "1.0.37"
|
|||||||
|
|
||||||
tera = "1.17.1"
|
tera = "1.17.1"
|
||||||
serde = { version = "1.0.147", features = ["derive"] }
|
serde = { version = "1.0.147", features = ["derive"] }
|
||||||
serde_json = "1.0.87"
|
serde_json = "1.0.88"
|
||||||
serde_urlencoded = "0.7.1"
|
serde_urlencoded = "0.7.1"
|
||||||
|
|
||||||
chrono = "0.4.23"
|
chrono = "0.4.23"
|
||||||
|
Reference in New Issue
Block a user