3 files changed
+140
-3
Cargo.lock
+133
-3
@@ -201,6 +201,12 @@ version = "1.0.4"
201
source = "registry+https://github.com/rust-lang/crates.io-index"
202
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
203
204
+[[package]]
205
+name = "cfg_aliases"
206
+version = "0.2.1"
207
+source = "registry+https://github.com/rust-lang/crates.io-index"
208
+checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
209
+
210
[[package]]
211
name = "chrono"
212
version = "0.4.42"
@@ -331,6 +337,16 @@ dependencies = [
337
"libc",
338
]
339
340
+[[package]]
341
+name = "core-foundation"
342
+version = "0.10.1"
343
+source = "registry+https://github.com/rust-lang/crates.io-index"
344
+checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
345
+dependencies = [
346
+ "core-foundation-sys",
347
+ "libc",
348
+]
349
+
350
[[package]]
351
name = "core-foundation-sys"
352
version = "0.8.7"
@@ -581,8 +597,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
597
checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
598
dependencies = [
599
"cfg-if",
600
+ "js-sys",
601
"libc",
602
"wasi",
603
+ "wasm-bindgen",
604
]
605
606
[[package]]
@@ -592,9 +610,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
610
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
611
dependencies = [
612
"cfg-if",
613
+ "js-sys",
614
"libc",
615
"r-efi",
616
"wasip2",
617
+ "wasm-bindgen",
618
]
619
620
[[package]]
@@ -765,6 +785,7 @@ dependencies = [
785
"hyper",
786
"hyper-util",
787
"rustls",
788
+ "rustls-native-certs",
789
"rustls-pki-types",
790
"tokio",
791
"tokio-rustls",
@@ -1134,6 +1155,12 @@ dependencies = [
1155
"tracing-subscriber",
1156
]
1157
1158
+[[package]]
1159
+name = "lru-slab"
1160
+version = "0.1.2"
1161
+source = "registry+https://github.com/rust-lang/crates.io-index"
1162
+checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154"
1163
+
1164
[[package]]
1165
name = "maplit"
1166
version = "1.0.2"
@@ -1205,7 +1232,7 @@ dependencies = [
1232
"openssl-probe",
1233
"openssl-sys",
1234
"schannel",
1208
- "security-framework",
1235
+ "security-framework 2.11.1",
1236
"security-framework-sys",
1237
"tempfile",
1238
]
@@ -1295,6 +1322,15 @@ version = "0.1.6"
1322
source = "registry+https://github.com/rust-lang/crates.io-index"
1323
checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
1324
1325
+[[package]]
1326
+name = "openssl-src"
1327
+version = "300.5.4+3.5.4"
1328
+source = "registry+https://github.com/rust-lang/crates.io-index"
1329
+checksum = "a507b3792995dae9b0df8a1c1e3771e8418b7c2d9f0baeba32e6fe8b06c7cb72"
1330
+dependencies = [
1331
+ "cc",
1332
+]
1333
+
1334
[[package]]
1335
name = "openssl-sys"
1336
version = "0.9.111"
@@ -1303,6 +1339,7 @@ checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321"
1339
dependencies = [
1340
"cc",
1341
"libc",
1342
+ "openssl-src",
1343
"pkg-config",
1344
"vcpkg",
1345
]
@@ -1510,6 +1547,61 @@ dependencies = [
1547
"unicode-ident",
1548
]
1549
1550
+[[package]]
1551
+name = "quinn"
1552
+version = "0.11.9"
1553
+source = "registry+https://github.com/rust-lang/crates.io-index"
1554
+checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20"
1555
+dependencies = [
1556
+ "bytes",
1557
+ "cfg_aliases",
1558
+ "pin-project-lite",
1559
+ "quinn-proto",
1560
+ "quinn-udp",
1561
+ "rustc-hash",
1562
+ "rustls",
1563
+ "socket2",
1564
+ "thiserror 2.0.17",
1565
+ "tokio",
1566
+ "tracing",
1567
+ "web-time",
1568
+]
1569
+
1570
+[[package]]
1571
+name = "quinn-proto"
1572
+version = "0.11.13"
1573
+source = "registry+https://github.com/rust-lang/crates.io-index"
1574
+checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31"
1575
+dependencies = [
1576
+ "bytes",
1577
+ "getrandom 0.3.4",
1578
+ "lru-slab",
1579
+ "rand",
1580
+ "ring",
1581
+ "rustc-hash",
1582
+ "rustls",
1583
+ "rustls-pki-types",
1584
+ "slab",
1585
+ "thiserror 2.0.17",
1586
+ "tinyvec",
1587
+ "tracing",
1588
+ "web-time",
1589
+]
1590
+
1591
+[[package]]
1592
+name = "quinn-udp"
1593
+version = "0.5.14"
1594
+source = "registry+https://github.com/rust-lang/crates.io-index"
1595
+checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd"
1596
+dependencies = [
1597
+ "cfg_aliases",
1598
+ "libc",
1599
+ "once_cell",
1600
+ "socket2",
1601
+ "tracing",
1602
+ "windows-sys 0.52.0",
1603
+]
1604
+
1605
[[package]]
1606
name = "quote"
1607
version = "1.0.42"
@@ -1627,6 +1719,9 @@ dependencies = [
1719
"native-tls",
1720
"percent-encoding",
1721
"pin-project-lite",
1722
+ "quinn",
1723
+ "rustls",
1724
+ "rustls-native-certs",
1725
"rustls-pki-types",
1726
"serde",
1727
"serde_json",
@@ -1634,6 +1729,7 @@ dependencies = [
1729
"sync_wrapper",
1730
"tokio",
1731
"tokio-native-tls",
1732
+ "tokio-rustls",
1733
"tower",
1734
"tower-http",
1735
"tower-service",
@@ -1663,6 +1759,12 @@ version = "0.2.2"
1759
source = "registry+https://github.com/rust-lang/crates.io-index"
1760
checksum = "88f8660c1ff60292143c98d08fc6e2f654d722db50410e3f3797d40baaf9d8f3"
1761
1762
+[[package]]
1763
+name = "rustc-hash"
1764
+version = "2.1.1"
1765
+source = "registry+https://github.com/rust-lang/crates.io-index"
1766
+checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
1767
+
1768
[[package]]
1769
name = "rustix"
1770
version = "1.1.2"
@@ -1683,18 +1785,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1785
checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f"
1786
dependencies = [
1787
"once_cell",
1788
+ "ring",
1789
"rustls-pki-types",
1790
"rustls-webpki",
1791
"subtle",
1792
"zeroize",
1793
]
1794
1795
+[[package]]
1796
+name = "rustls-native-certs"
1797
+version = "0.8.2"
1798
+source = "registry+https://github.com/rust-lang/crates.io-index"
1799
+checksum = "9980d917ebb0c0536119ba501e90834767bffc3d60641457fd84a1f3fd337923"
1800
+dependencies = [
1801
+ "openssl-probe",
1802
+ "rustls-pki-types",
1803
+ "schannel",
1804
+ "security-framework 3.5.1",
1805
+]
1806
+
1807
[[package]]
1808
name = "rustls-pki-types"
1809
version = "1.13.0"
1810
source = "registry+https://github.com/rust-lang/crates.io-index"
1811
checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a"
1812
dependencies = [
1813
+ "web-time",
1814
"zeroize",
1815
]
1816
@@ -1758,7 +1874,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
1874
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
1875
dependencies = [
1876
"bitflags 2.10.0",
1761
- "core-foundation",
1877
+ "core-foundation 0.9.4",
1878
+ "core-foundation-sys",
1879
+ "libc",
1880
+ "security-framework-sys",
1881
+]
1882
+
1883
+[[package]]
1884
+name = "security-framework"
1885
+version = "3.5.1"
1886
+source = "registry+https://github.com/rust-lang/crates.io-index"
1887
+checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef"
1888
+dependencies = [
1889
+ "bitflags 2.10.0",
1890
+ "core-foundation 0.10.1",
1891
"core-foundation-sys",
1892
"libc",
1893
"security-framework-sys",
@@ -1999,6 +2128,7 @@ name = "smbcloud-networking-account"
2128
version = "0.3.26"
2129
dependencies = [
2130
"log",
2131
+ "openssl",
2132
"reqwest",
2133
"serde_json",
2134
"smbcloud-model",
@@ -2228,7 +2358,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2358
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
2359
dependencies = [
2360
"bitflags 2.10.0",
2231
- "core-foundation",
2361
+ "core-foundation 0.9.4",
2362
"system-configuration-sys",
2363
]
2364
crates/smbcloud-networking-account/src/oauth/get_consent_url.rs
new
+6
@@ -0,0 +1,6 @@
1
+pub fn get_consent_url(client_id: String, redirect_uri: String) -> String {
2
+ format!(
3
+ "https://accounts.google.com/o/oauth2/auth?client_id={}&redirect_uri={}&scope=email%20profile&response_type=code&access_type=offline",
4
+ client_id, redirect_uri
5
+ )
6
+}
crates/smbcloud-networking-account/src/oauth/mod.rs
+1
@@ -1,2 +1,3 @@
1
+pub mod get_consent_url;
2
pub mod get_profile;
3
pub mod get_token;