├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md └── src ├── bin └── decap_oauth.rs └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "android-tzdata" 22 | version = "0.1.1" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 25 | 26 | [[package]] 27 | name = "android_system_properties" 28 | version = "0.1.5" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 31 | dependencies = [ 32 | "libc", 33 | ] 34 | 35 | [[package]] 36 | name = "async-trait" 37 | version = "0.1.82" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" 40 | dependencies = [ 41 | "proc-macro2", 42 | "quote", 43 | "syn", 44 | ] 45 | 46 | [[package]] 47 | name = "autocfg" 48 | version = "1.3.0" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 51 | 52 | [[package]] 53 | name = "axum" 54 | version = "0.7.6" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | checksum = "8f43644eed690f5374f1af436ecd6aea01cd201f6fbdf0178adaf6907afb2cec" 57 | dependencies = [ 58 | "async-trait", 59 | "axum-core", 60 | "bytes", 61 | "futures-util", 62 | "http 1.1.0", 63 | "http-body 1.0.1", 64 | "http-body-util", 65 | "hyper 1.4.1", 66 | "hyper-util", 67 | "itoa", 68 | "matchit", 69 | "memchr", 70 | "mime", 71 | "percent-encoding", 72 | "pin-project-lite", 73 | "rustversion", 74 | "serde", 75 | "serde_json", 76 | "serde_path_to_error", 77 | "serde_urlencoded", 78 | "sync_wrapper 1.0.1", 79 | "tokio", 80 | "tower 0.5.1", 81 | "tower-layer", 82 | "tower-service", 83 | "tracing", 84 | ] 85 | 86 | [[package]] 87 | name = "axum-core" 88 | version = "0.4.4" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "5e6b8ba012a258d63c9adfa28b9ddcf66149da6f986c5b5452e629d5ee64bf00" 91 | dependencies = [ 92 | "async-trait", 93 | "bytes", 94 | "futures-util", 95 | "http 1.1.0", 96 | "http-body 1.0.1", 97 | "http-body-util", 98 | "mime", 99 | "pin-project-lite", 100 | "rustversion", 101 | "sync_wrapper 1.0.1", 102 | "tower-layer", 103 | "tower-service", 104 | "tracing", 105 | ] 106 | 107 | [[package]] 108 | name = "backtrace" 109 | version = "0.3.74" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 112 | dependencies = [ 113 | "addr2line", 114 | "cfg-if", 115 | "libc", 116 | "miniz_oxide", 117 | "object", 118 | "rustc-demangle", 119 | "windows-targets 0.52.6", 120 | ] 121 | 122 | [[package]] 123 | name = "base64" 124 | version = "0.13.1" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" 127 | 128 | [[package]] 129 | name = "base64" 130 | version = "0.21.7" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 133 | 134 | [[package]] 135 | name = "bitflags" 136 | version = "1.3.2" 137 | source = "registry+https://github.com/rust-lang/crates.io-index" 138 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 139 | 140 | [[package]] 141 | name = "bitflags" 142 | version = "2.6.0" 143 | source = "registry+https://github.com/rust-lang/crates.io-index" 144 | checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 145 | 146 | [[package]] 147 | name = "block-buffer" 148 | version = "0.10.4" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 151 | dependencies = [ 152 | "generic-array", 153 | ] 154 | 155 | [[package]] 156 | name = "bumpalo" 157 | version = "3.16.0" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 160 | 161 | [[package]] 162 | name = "byteorder" 163 | version = "1.5.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 166 | 167 | [[package]] 168 | name = "bytes" 169 | version = "1.7.2" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" 172 | 173 | [[package]] 174 | name = "cc" 175 | version = "1.1.21" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" 178 | dependencies = [ 179 | "shlex", 180 | ] 181 | 182 | [[package]] 183 | name = "cfg-if" 184 | version = "1.0.0" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 187 | 188 | [[package]] 189 | name = "chrono" 190 | version = "0.4.38" 191 | source = "registry+https://github.com/rust-lang/crates.io-index" 192 | checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" 193 | dependencies = [ 194 | "android-tzdata", 195 | "iana-time-zone", 196 | "js-sys", 197 | "num-traits", 198 | "serde", 199 | "wasm-bindgen", 200 | "windows-targets 0.52.6", 201 | ] 202 | 203 | [[package]] 204 | name = "core-foundation" 205 | version = "0.9.4" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 208 | dependencies = [ 209 | "core-foundation-sys", 210 | "libc", 211 | ] 212 | 213 | [[package]] 214 | name = "core-foundation-sys" 215 | version = "0.8.7" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 218 | 219 | [[package]] 220 | name = "cpufeatures" 221 | version = "0.2.14" 222 | source = "registry+https://github.com/rust-lang/crates.io-index" 223 | checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" 224 | dependencies = [ 225 | "libc", 226 | ] 227 | 228 | [[package]] 229 | name = "crypto-common" 230 | version = "0.1.6" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 233 | dependencies = [ 234 | "generic-array", 235 | "typenum", 236 | ] 237 | 238 | [[package]] 239 | name = "decap_oauth" 240 | version = "0.0.2" 241 | dependencies = [ 242 | "axum", 243 | "oauth2", 244 | "reqwest", 245 | "tokio", 246 | ] 247 | 248 | [[package]] 249 | name = "digest" 250 | version = "0.10.7" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 253 | dependencies = [ 254 | "block-buffer", 255 | "crypto-common", 256 | ] 257 | 258 | [[package]] 259 | name = "encoding_rs" 260 | version = "0.8.34" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" 263 | dependencies = [ 264 | "cfg-if", 265 | ] 266 | 267 | [[package]] 268 | name = "equivalent" 269 | version = "1.0.1" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 272 | 273 | [[package]] 274 | name = "errno" 275 | version = "0.3.9" 276 | source = "registry+https://github.com/rust-lang/crates.io-index" 277 | checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 278 | dependencies = [ 279 | "libc", 280 | "windows-sys 0.52.0", 281 | ] 282 | 283 | [[package]] 284 | name = "fastrand" 285 | version = "2.1.1" 286 | source = "registry+https://github.com/rust-lang/crates.io-index" 287 | checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" 288 | 289 | [[package]] 290 | name = "fnv" 291 | version = "1.0.7" 292 | source = "registry+https://github.com/rust-lang/crates.io-index" 293 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 294 | 295 | [[package]] 296 | name = "foreign-types" 297 | version = "0.3.2" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 300 | dependencies = [ 301 | "foreign-types-shared", 302 | ] 303 | 304 | [[package]] 305 | name = "foreign-types-shared" 306 | version = "0.1.1" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 309 | 310 | [[package]] 311 | name = "form_urlencoded" 312 | version = "1.2.1" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 315 | dependencies = [ 316 | "percent-encoding", 317 | ] 318 | 319 | [[package]] 320 | name = "futures-channel" 321 | version = "0.3.30" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 324 | dependencies = [ 325 | "futures-core", 326 | ] 327 | 328 | [[package]] 329 | name = "futures-core" 330 | version = "0.3.30" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 333 | 334 | [[package]] 335 | name = "futures-io" 336 | version = "0.3.30" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 339 | 340 | [[package]] 341 | name = "futures-sink" 342 | version = "0.3.30" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 345 | 346 | [[package]] 347 | name = "futures-task" 348 | version = "0.3.30" 349 | source = "registry+https://github.com/rust-lang/crates.io-index" 350 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 351 | 352 | [[package]] 353 | name = "futures-util" 354 | version = "0.3.30" 355 | source = "registry+https://github.com/rust-lang/crates.io-index" 356 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 357 | dependencies = [ 358 | "futures-core", 359 | "futures-io", 360 | "futures-task", 361 | "memchr", 362 | "pin-project-lite", 363 | "pin-utils", 364 | "slab", 365 | ] 366 | 367 | [[package]] 368 | name = "generic-array" 369 | version = "0.14.7" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 372 | dependencies = [ 373 | "typenum", 374 | "version_check", 375 | ] 376 | 377 | [[package]] 378 | name = "getrandom" 379 | version = "0.2.15" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 382 | dependencies = [ 383 | "cfg-if", 384 | "js-sys", 385 | "libc", 386 | "wasi", 387 | "wasm-bindgen", 388 | ] 389 | 390 | [[package]] 391 | name = "gimli" 392 | version = "0.31.0" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" 395 | 396 | [[package]] 397 | name = "h2" 398 | version = "0.3.26" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 401 | dependencies = [ 402 | "bytes", 403 | "fnv", 404 | "futures-core", 405 | "futures-sink", 406 | "futures-util", 407 | "http 0.2.12", 408 | "indexmap", 409 | "slab", 410 | "tokio", 411 | "tokio-util", 412 | "tracing", 413 | ] 414 | 415 | [[package]] 416 | name = "hashbrown" 417 | version = "0.14.5" 418 | source = "registry+https://github.com/rust-lang/crates.io-index" 419 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 420 | 421 | [[package]] 422 | name = "hermit-abi" 423 | version = "0.3.9" 424 | source = "registry+https://github.com/rust-lang/crates.io-index" 425 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 426 | 427 | [[package]] 428 | name = "http" 429 | version = "0.2.12" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 432 | dependencies = [ 433 | "bytes", 434 | "fnv", 435 | "itoa", 436 | ] 437 | 438 | [[package]] 439 | name = "http" 440 | version = "1.1.0" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" 443 | dependencies = [ 444 | "bytes", 445 | "fnv", 446 | "itoa", 447 | ] 448 | 449 | [[package]] 450 | name = "http-body" 451 | version = "0.4.6" 452 | source = "registry+https://github.com/rust-lang/crates.io-index" 453 | checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" 454 | dependencies = [ 455 | "bytes", 456 | "http 0.2.12", 457 | "pin-project-lite", 458 | ] 459 | 460 | [[package]] 461 | name = "http-body" 462 | version = "1.0.1" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 465 | dependencies = [ 466 | "bytes", 467 | "http 1.1.0", 468 | ] 469 | 470 | [[package]] 471 | name = "http-body-util" 472 | version = "0.1.2" 473 | source = "registry+https://github.com/rust-lang/crates.io-index" 474 | checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" 475 | dependencies = [ 476 | "bytes", 477 | "futures-util", 478 | "http 1.1.0", 479 | "http-body 1.0.1", 480 | "pin-project-lite", 481 | ] 482 | 483 | [[package]] 484 | name = "httparse" 485 | version = "1.9.4" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" 488 | 489 | [[package]] 490 | name = "httpdate" 491 | version = "1.0.3" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 494 | 495 | [[package]] 496 | name = "hyper" 497 | version = "0.14.30" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" 500 | dependencies = [ 501 | "bytes", 502 | "futures-channel", 503 | "futures-core", 504 | "futures-util", 505 | "h2", 506 | "http 0.2.12", 507 | "http-body 0.4.6", 508 | "httparse", 509 | "httpdate", 510 | "itoa", 511 | "pin-project-lite", 512 | "socket2", 513 | "tokio", 514 | "tower-service", 515 | "tracing", 516 | "want", 517 | ] 518 | 519 | [[package]] 520 | name = "hyper" 521 | version = "1.4.1" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" 524 | dependencies = [ 525 | "bytes", 526 | "futures-channel", 527 | "futures-util", 528 | "http 1.1.0", 529 | "http-body 1.0.1", 530 | "httparse", 531 | "httpdate", 532 | "itoa", 533 | "pin-project-lite", 534 | "smallvec", 535 | "tokio", 536 | ] 537 | 538 | [[package]] 539 | name = "hyper-rustls" 540 | version = "0.24.2" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" 543 | dependencies = [ 544 | "futures-util", 545 | "http 0.2.12", 546 | "hyper 0.14.30", 547 | "rustls", 548 | "tokio", 549 | "tokio-rustls", 550 | ] 551 | 552 | [[package]] 553 | name = "hyper-tls" 554 | version = "0.5.0" 555 | source = "registry+https://github.com/rust-lang/crates.io-index" 556 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 557 | dependencies = [ 558 | "bytes", 559 | "hyper 0.14.30", 560 | "native-tls", 561 | "tokio", 562 | "tokio-native-tls", 563 | ] 564 | 565 | [[package]] 566 | name = "hyper-util" 567 | version = "0.1.8" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" 570 | dependencies = [ 571 | "bytes", 572 | "futures-util", 573 | "http 1.1.0", 574 | "http-body 1.0.1", 575 | "hyper 1.4.1", 576 | "pin-project-lite", 577 | "tokio", 578 | "tower 0.4.13", 579 | "tower-service", 580 | ] 581 | 582 | [[package]] 583 | name = "iana-time-zone" 584 | version = "0.1.61" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" 587 | dependencies = [ 588 | "android_system_properties", 589 | "core-foundation-sys", 590 | "iana-time-zone-haiku", 591 | "js-sys", 592 | "wasm-bindgen", 593 | "windows-core", 594 | ] 595 | 596 | [[package]] 597 | name = "iana-time-zone-haiku" 598 | version = "0.1.2" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 601 | dependencies = [ 602 | "cc", 603 | ] 604 | 605 | [[package]] 606 | name = "idna" 607 | version = "0.5.0" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 610 | dependencies = [ 611 | "unicode-bidi", 612 | "unicode-normalization", 613 | ] 614 | 615 | [[package]] 616 | name = "indexmap" 617 | version = "2.5.0" 618 | source = "registry+https://github.com/rust-lang/crates.io-index" 619 | checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" 620 | dependencies = [ 621 | "equivalent", 622 | "hashbrown", 623 | ] 624 | 625 | [[package]] 626 | name = "ipnet" 627 | version = "2.10.0" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" 630 | 631 | [[package]] 632 | name = "itoa" 633 | version = "1.0.11" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 636 | 637 | [[package]] 638 | name = "js-sys" 639 | version = "0.3.70" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" 642 | dependencies = [ 643 | "wasm-bindgen", 644 | ] 645 | 646 | [[package]] 647 | name = "libc" 648 | version = "0.2.158" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" 651 | 652 | [[package]] 653 | name = "linux-raw-sys" 654 | version = "0.4.14" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 657 | 658 | [[package]] 659 | name = "lock_api" 660 | version = "0.4.12" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 663 | dependencies = [ 664 | "autocfg", 665 | "scopeguard", 666 | ] 667 | 668 | [[package]] 669 | name = "log" 670 | version = "0.4.22" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 673 | 674 | [[package]] 675 | name = "matchit" 676 | version = "0.7.3" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" 679 | 680 | [[package]] 681 | name = "memchr" 682 | version = "2.7.4" 683 | source = "registry+https://github.com/rust-lang/crates.io-index" 684 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 685 | 686 | [[package]] 687 | name = "mime" 688 | version = "0.3.17" 689 | source = "registry+https://github.com/rust-lang/crates.io-index" 690 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 691 | 692 | [[package]] 693 | name = "miniz_oxide" 694 | version = "0.8.0" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" 697 | dependencies = [ 698 | "adler2", 699 | ] 700 | 701 | [[package]] 702 | name = "mio" 703 | version = "1.0.2" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" 706 | dependencies = [ 707 | "hermit-abi", 708 | "libc", 709 | "wasi", 710 | "windows-sys 0.52.0", 711 | ] 712 | 713 | [[package]] 714 | name = "native-tls" 715 | version = "0.2.12" 716 | source = "registry+https://github.com/rust-lang/crates.io-index" 717 | checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" 718 | dependencies = [ 719 | "libc", 720 | "log", 721 | "openssl", 722 | "openssl-probe", 723 | "openssl-sys", 724 | "schannel", 725 | "security-framework", 726 | "security-framework-sys", 727 | "tempfile", 728 | ] 729 | 730 | [[package]] 731 | name = "num-traits" 732 | version = "0.2.19" 733 | source = "registry+https://github.com/rust-lang/crates.io-index" 734 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 735 | dependencies = [ 736 | "autocfg", 737 | ] 738 | 739 | [[package]] 740 | name = "oauth2" 741 | version = "4.4.2" 742 | source = "registry+https://github.com/rust-lang/crates.io-index" 743 | checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" 744 | dependencies = [ 745 | "base64 0.13.1", 746 | "chrono", 747 | "getrandom", 748 | "http 0.2.12", 749 | "rand", 750 | "reqwest", 751 | "serde", 752 | "serde_json", 753 | "serde_path_to_error", 754 | "sha2", 755 | "thiserror", 756 | "url", 757 | ] 758 | 759 | [[package]] 760 | name = "object" 761 | version = "0.36.4" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" 764 | dependencies = [ 765 | "memchr", 766 | ] 767 | 768 | [[package]] 769 | name = "once_cell" 770 | version = "1.19.0" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 773 | 774 | [[package]] 775 | name = "openssl" 776 | version = "0.10.66" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" 779 | dependencies = [ 780 | "bitflags 2.6.0", 781 | "cfg-if", 782 | "foreign-types", 783 | "libc", 784 | "once_cell", 785 | "openssl-macros", 786 | "openssl-sys", 787 | ] 788 | 789 | [[package]] 790 | name = "openssl-macros" 791 | version = "0.1.1" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 794 | dependencies = [ 795 | "proc-macro2", 796 | "quote", 797 | "syn", 798 | ] 799 | 800 | [[package]] 801 | name = "openssl-probe" 802 | version = "0.1.5" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 805 | 806 | [[package]] 807 | name = "openssl-sys" 808 | version = "0.9.103" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" 811 | dependencies = [ 812 | "cc", 813 | "libc", 814 | "pkg-config", 815 | "vcpkg", 816 | ] 817 | 818 | [[package]] 819 | name = "parking_lot" 820 | version = "0.12.3" 821 | source = "registry+https://github.com/rust-lang/crates.io-index" 822 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 823 | dependencies = [ 824 | "lock_api", 825 | "parking_lot_core", 826 | ] 827 | 828 | [[package]] 829 | name = "parking_lot_core" 830 | version = "0.9.10" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 833 | dependencies = [ 834 | "cfg-if", 835 | "libc", 836 | "redox_syscall", 837 | "smallvec", 838 | "windows-targets 0.52.6", 839 | ] 840 | 841 | [[package]] 842 | name = "percent-encoding" 843 | version = "2.3.1" 844 | source = "registry+https://github.com/rust-lang/crates.io-index" 845 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 846 | 847 | [[package]] 848 | name = "pin-project" 849 | version = "1.1.5" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" 852 | dependencies = [ 853 | "pin-project-internal", 854 | ] 855 | 856 | [[package]] 857 | name = "pin-project-internal" 858 | version = "1.1.5" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" 861 | dependencies = [ 862 | "proc-macro2", 863 | "quote", 864 | "syn", 865 | ] 866 | 867 | [[package]] 868 | name = "pin-project-lite" 869 | version = "0.2.14" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 872 | 873 | [[package]] 874 | name = "pin-utils" 875 | version = "0.1.0" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 878 | 879 | [[package]] 880 | name = "pkg-config" 881 | version = "0.3.30" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 884 | 885 | [[package]] 886 | name = "ppv-lite86" 887 | version = "0.2.20" 888 | source = "registry+https://github.com/rust-lang/crates.io-index" 889 | checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" 890 | dependencies = [ 891 | "zerocopy", 892 | ] 893 | 894 | [[package]] 895 | name = "proc-macro2" 896 | version = "1.0.86" 897 | source = "registry+https://github.com/rust-lang/crates.io-index" 898 | checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" 899 | dependencies = [ 900 | "unicode-ident", 901 | ] 902 | 903 | [[package]] 904 | name = "quote" 905 | version = "1.0.37" 906 | source = "registry+https://github.com/rust-lang/crates.io-index" 907 | checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 908 | dependencies = [ 909 | "proc-macro2", 910 | ] 911 | 912 | [[package]] 913 | name = "rand" 914 | version = "0.8.5" 915 | source = "registry+https://github.com/rust-lang/crates.io-index" 916 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 917 | dependencies = [ 918 | "libc", 919 | "rand_chacha", 920 | "rand_core", 921 | ] 922 | 923 | [[package]] 924 | name = "rand_chacha" 925 | version = "0.3.1" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 928 | dependencies = [ 929 | "ppv-lite86", 930 | "rand_core", 931 | ] 932 | 933 | [[package]] 934 | name = "rand_core" 935 | version = "0.6.4" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 938 | dependencies = [ 939 | "getrandom", 940 | ] 941 | 942 | [[package]] 943 | name = "redox_syscall" 944 | version = "0.5.4" 945 | source = "registry+https://github.com/rust-lang/crates.io-index" 946 | checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" 947 | dependencies = [ 948 | "bitflags 2.6.0", 949 | ] 950 | 951 | [[package]] 952 | name = "reqwest" 953 | version = "0.11.27" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" 956 | dependencies = [ 957 | "base64 0.21.7", 958 | "bytes", 959 | "encoding_rs", 960 | "futures-core", 961 | "futures-util", 962 | "h2", 963 | "http 0.2.12", 964 | "http-body 0.4.6", 965 | "hyper 0.14.30", 966 | "hyper-rustls", 967 | "hyper-tls", 968 | "ipnet", 969 | "js-sys", 970 | "log", 971 | "mime", 972 | "native-tls", 973 | "once_cell", 974 | "percent-encoding", 975 | "pin-project-lite", 976 | "rustls", 977 | "rustls-pemfile", 978 | "serde", 979 | "serde_json", 980 | "serde_urlencoded", 981 | "sync_wrapper 0.1.2", 982 | "system-configuration", 983 | "tokio", 984 | "tokio-native-tls", 985 | "tokio-rustls", 986 | "tower-service", 987 | "url", 988 | "wasm-bindgen", 989 | "wasm-bindgen-futures", 990 | "web-sys", 991 | "webpki-roots", 992 | "winreg", 993 | ] 994 | 995 | [[package]] 996 | name = "ring" 997 | version = "0.17.8" 998 | source = "registry+https://github.com/rust-lang/crates.io-index" 999 | checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" 1000 | dependencies = [ 1001 | "cc", 1002 | "cfg-if", 1003 | "getrandom", 1004 | "libc", 1005 | "spin", 1006 | "untrusted", 1007 | "windows-sys 0.52.0", 1008 | ] 1009 | 1010 | [[package]] 1011 | name = "rustc-demangle" 1012 | version = "0.1.24" 1013 | source = "registry+https://github.com/rust-lang/crates.io-index" 1014 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 1015 | 1016 | [[package]] 1017 | name = "rustix" 1018 | version = "0.38.37" 1019 | source = "registry+https://github.com/rust-lang/crates.io-index" 1020 | checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" 1021 | dependencies = [ 1022 | "bitflags 2.6.0", 1023 | "errno", 1024 | "libc", 1025 | "linux-raw-sys", 1026 | "windows-sys 0.52.0", 1027 | ] 1028 | 1029 | [[package]] 1030 | name = "rustls" 1031 | version = "0.21.12" 1032 | source = "registry+https://github.com/rust-lang/crates.io-index" 1033 | checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" 1034 | dependencies = [ 1035 | "log", 1036 | "ring", 1037 | "rustls-webpki", 1038 | "sct", 1039 | ] 1040 | 1041 | [[package]] 1042 | name = "rustls-pemfile" 1043 | version = "1.0.4" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" 1046 | dependencies = [ 1047 | "base64 0.21.7", 1048 | ] 1049 | 1050 | [[package]] 1051 | name = "rustls-webpki" 1052 | version = "0.101.7" 1053 | source = "registry+https://github.com/rust-lang/crates.io-index" 1054 | checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" 1055 | dependencies = [ 1056 | "ring", 1057 | "untrusted", 1058 | ] 1059 | 1060 | [[package]] 1061 | name = "rustversion" 1062 | version = "1.0.17" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" 1065 | 1066 | [[package]] 1067 | name = "ryu" 1068 | version = "1.0.18" 1069 | source = "registry+https://github.com/rust-lang/crates.io-index" 1070 | checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 1071 | 1072 | [[package]] 1073 | name = "schannel" 1074 | version = "0.1.24" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" 1077 | dependencies = [ 1078 | "windows-sys 0.59.0", 1079 | ] 1080 | 1081 | [[package]] 1082 | name = "scopeguard" 1083 | version = "1.2.0" 1084 | source = "registry+https://github.com/rust-lang/crates.io-index" 1085 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1086 | 1087 | [[package]] 1088 | name = "sct" 1089 | version = "0.7.1" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" 1092 | dependencies = [ 1093 | "ring", 1094 | "untrusted", 1095 | ] 1096 | 1097 | [[package]] 1098 | name = "security-framework" 1099 | version = "2.11.1" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1102 | dependencies = [ 1103 | "bitflags 2.6.0", 1104 | "core-foundation", 1105 | "core-foundation-sys", 1106 | "libc", 1107 | "security-framework-sys", 1108 | ] 1109 | 1110 | [[package]] 1111 | name = "security-framework-sys" 1112 | version = "2.12.0" 1113 | source = "registry+https://github.com/rust-lang/crates.io-index" 1114 | checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" 1115 | dependencies = [ 1116 | "core-foundation-sys", 1117 | "libc", 1118 | ] 1119 | 1120 | [[package]] 1121 | name = "serde" 1122 | version = "1.0.210" 1123 | source = "registry+https://github.com/rust-lang/crates.io-index" 1124 | checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" 1125 | dependencies = [ 1126 | "serde_derive", 1127 | ] 1128 | 1129 | [[package]] 1130 | name = "serde_derive" 1131 | version = "1.0.210" 1132 | source = "registry+https://github.com/rust-lang/crates.io-index" 1133 | checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" 1134 | dependencies = [ 1135 | "proc-macro2", 1136 | "quote", 1137 | "syn", 1138 | ] 1139 | 1140 | [[package]] 1141 | name = "serde_json" 1142 | version = "1.0.128" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" 1145 | dependencies = [ 1146 | "itoa", 1147 | "memchr", 1148 | "ryu", 1149 | "serde", 1150 | ] 1151 | 1152 | [[package]] 1153 | name = "serde_path_to_error" 1154 | version = "0.1.16" 1155 | source = "registry+https://github.com/rust-lang/crates.io-index" 1156 | checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" 1157 | dependencies = [ 1158 | "itoa", 1159 | "serde", 1160 | ] 1161 | 1162 | [[package]] 1163 | name = "serde_urlencoded" 1164 | version = "0.7.1" 1165 | source = "registry+https://github.com/rust-lang/crates.io-index" 1166 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1167 | dependencies = [ 1168 | "form_urlencoded", 1169 | "itoa", 1170 | "ryu", 1171 | "serde", 1172 | ] 1173 | 1174 | [[package]] 1175 | name = "sha2" 1176 | version = "0.10.8" 1177 | source = "registry+https://github.com/rust-lang/crates.io-index" 1178 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 1179 | dependencies = [ 1180 | "cfg-if", 1181 | "cpufeatures", 1182 | "digest", 1183 | ] 1184 | 1185 | [[package]] 1186 | name = "shlex" 1187 | version = "1.3.0" 1188 | source = "registry+https://github.com/rust-lang/crates.io-index" 1189 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 1190 | 1191 | [[package]] 1192 | name = "signal-hook-registry" 1193 | version = "1.4.2" 1194 | source = "registry+https://github.com/rust-lang/crates.io-index" 1195 | checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" 1196 | dependencies = [ 1197 | "libc", 1198 | ] 1199 | 1200 | [[package]] 1201 | name = "slab" 1202 | version = "0.4.9" 1203 | source = "registry+https://github.com/rust-lang/crates.io-index" 1204 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1205 | dependencies = [ 1206 | "autocfg", 1207 | ] 1208 | 1209 | [[package]] 1210 | name = "smallvec" 1211 | version = "1.13.2" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 1214 | 1215 | [[package]] 1216 | name = "socket2" 1217 | version = "0.5.7" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" 1220 | dependencies = [ 1221 | "libc", 1222 | "windows-sys 0.52.0", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "spin" 1227 | version = "0.9.8" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 1230 | 1231 | [[package]] 1232 | name = "syn" 1233 | version = "2.0.77" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" 1236 | dependencies = [ 1237 | "proc-macro2", 1238 | "quote", 1239 | "unicode-ident", 1240 | ] 1241 | 1242 | [[package]] 1243 | name = "sync_wrapper" 1244 | version = "0.1.2" 1245 | source = "registry+https://github.com/rust-lang/crates.io-index" 1246 | checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 1247 | 1248 | [[package]] 1249 | name = "sync_wrapper" 1250 | version = "1.0.1" 1251 | source = "registry+https://github.com/rust-lang/crates.io-index" 1252 | checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" 1253 | 1254 | [[package]] 1255 | name = "system-configuration" 1256 | version = "0.5.1" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" 1259 | dependencies = [ 1260 | "bitflags 1.3.2", 1261 | "core-foundation", 1262 | "system-configuration-sys", 1263 | ] 1264 | 1265 | [[package]] 1266 | name = "system-configuration-sys" 1267 | version = "0.5.0" 1268 | source = "registry+https://github.com/rust-lang/crates.io-index" 1269 | checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" 1270 | dependencies = [ 1271 | "core-foundation-sys", 1272 | "libc", 1273 | ] 1274 | 1275 | [[package]] 1276 | name = "tempfile" 1277 | version = "3.12.0" 1278 | source = "registry+https://github.com/rust-lang/crates.io-index" 1279 | checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" 1280 | dependencies = [ 1281 | "cfg-if", 1282 | "fastrand", 1283 | "once_cell", 1284 | "rustix", 1285 | "windows-sys 0.59.0", 1286 | ] 1287 | 1288 | [[package]] 1289 | name = "thiserror" 1290 | version = "1.0.63" 1291 | source = "registry+https://github.com/rust-lang/crates.io-index" 1292 | checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" 1293 | dependencies = [ 1294 | "thiserror-impl", 1295 | ] 1296 | 1297 | [[package]] 1298 | name = "thiserror-impl" 1299 | version = "1.0.63" 1300 | source = "registry+https://github.com/rust-lang/crates.io-index" 1301 | checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" 1302 | dependencies = [ 1303 | "proc-macro2", 1304 | "quote", 1305 | "syn", 1306 | ] 1307 | 1308 | [[package]] 1309 | name = "tinyvec" 1310 | version = "1.8.0" 1311 | source = "registry+https://github.com/rust-lang/crates.io-index" 1312 | checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" 1313 | dependencies = [ 1314 | "tinyvec_macros", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "tinyvec_macros" 1319 | version = "0.1.1" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1322 | 1323 | [[package]] 1324 | name = "tokio" 1325 | version = "1.40.0" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" 1328 | dependencies = [ 1329 | "backtrace", 1330 | "bytes", 1331 | "libc", 1332 | "mio", 1333 | "parking_lot", 1334 | "pin-project-lite", 1335 | "signal-hook-registry", 1336 | "socket2", 1337 | "tokio-macros", 1338 | "windows-sys 0.52.0", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "tokio-macros" 1343 | version = "2.4.0" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" 1346 | dependencies = [ 1347 | "proc-macro2", 1348 | "quote", 1349 | "syn", 1350 | ] 1351 | 1352 | [[package]] 1353 | name = "tokio-native-tls" 1354 | version = "0.3.1" 1355 | source = "registry+https://github.com/rust-lang/crates.io-index" 1356 | checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 1357 | dependencies = [ 1358 | "native-tls", 1359 | "tokio", 1360 | ] 1361 | 1362 | [[package]] 1363 | name = "tokio-rustls" 1364 | version = "0.24.1" 1365 | source = "registry+https://github.com/rust-lang/crates.io-index" 1366 | checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" 1367 | dependencies = [ 1368 | "rustls", 1369 | "tokio", 1370 | ] 1371 | 1372 | [[package]] 1373 | name = "tokio-util" 1374 | version = "0.7.12" 1375 | source = "registry+https://github.com/rust-lang/crates.io-index" 1376 | checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" 1377 | dependencies = [ 1378 | "bytes", 1379 | "futures-core", 1380 | "futures-sink", 1381 | "pin-project-lite", 1382 | "tokio", 1383 | ] 1384 | 1385 | [[package]] 1386 | name = "tower" 1387 | version = "0.4.13" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 1390 | dependencies = [ 1391 | "futures-core", 1392 | "futures-util", 1393 | "pin-project", 1394 | "pin-project-lite", 1395 | "tokio", 1396 | "tower-layer", 1397 | "tower-service", 1398 | ] 1399 | 1400 | [[package]] 1401 | name = "tower" 1402 | version = "0.5.1" 1403 | source = "registry+https://github.com/rust-lang/crates.io-index" 1404 | checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" 1405 | dependencies = [ 1406 | "futures-core", 1407 | "futures-util", 1408 | "pin-project-lite", 1409 | "sync_wrapper 0.1.2", 1410 | "tokio", 1411 | "tower-layer", 1412 | "tower-service", 1413 | "tracing", 1414 | ] 1415 | 1416 | [[package]] 1417 | name = "tower-layer" 1418 | version = "0.3.3" 1419 | source = "registry+https://github.com/rust-lang/crates.io-index" 1420 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 1421 | 1422 | [[package]] 1423 | name = "tower-service" 1424 | version = "0.3.3" 1425 | source = "registry+https://github.com/rust-lang/crates.io-index" 1426 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 1427 | 1428 | [[package]] 1429 | name = "tracing" 1430 | version = "0.1.40" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 1433 | dependencies = [ 1434 | "log", 1435 | "pin-project-lite", 1436 | "tracing-core", 1437 | ] 1438 | 1439 | [[package]] 1440 | name = "tracing-core" 1441 | version = "0.1.32" 1442 | source = "registry+https://github.com/rust-lang/crates.io-index" 1443 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 1444 | dependencies = [ 1445 | "once_cell", 1446 | ] 1447 | 1448 | [[package]] 1449 | name = "try-lock" 1450 | version = "0.2.5" 1451 | source = "registry+https://github.com/rust-lang/crates.io-index" 1452 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 1453 | 1454 | [[package]] 1455 | name = "typenum" 1456 | version = "1.17.0" 1457 | source = "registry+https://github.com/rust-lang/crates.io-index" 1458 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 1459 | 1460 | [[package]] 1461 | name = "unicode-bidi" 1462 | version = "0.3.15" 1463 | source = "registry+https://github.com/rust-lang/crates.io-index" 1464 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 1465 | 1466 | [[package]] 1467 | name = "unicode-ident" 1468 | version = "1.0.13" 1469 | source = "registry+https://github.com/rust-lang/crates.io-index" 1470 | checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" 1471 | 1472 | [[package]] 1473 | name = "unicode-normalization" 1474 | version = "0.1.24" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" 1477 | dependencies = [ 1478 | "tinyvec", 1479 | ] 1480 | 1481 | [[package]] 1482 | name = "untrusted" 1483 | version = "0.9.0" 1484 | source = "registry+https://github.com/rust-lang/crates.io-index" 1485 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 1486 | 1487 | [[package]] 1488 | name = "url" 1489 | version = "2.5.2" 1490 | source = "registry+https://github.com/rust-lang/crates.io-index" 1491 | checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" 1492 | dependencies = [ 1493 | "form_urlencoded", 1494 | "idna", 1495 | "percent-encoding", 1496 | "serde", 1497 | ] 1498 | 1499 | [[package]] 1500 | name = "vcpkg" 1501 | version = "0.2.15" 1502 | source = "registry+https://github.com/rust-lang/crates.io-index" 1503 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 1504 | 1505 | [[package]] 1506 | name = "version_check" 1507 | version = "0.9.5" 1508 | source = "registry+https://github.com/rust-lang/crates.io-index" 1509 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 1510 | 1511 | [[package]] 1512 | name = "want" 1513 | version = "0.3.1" 1514 | source = "registry+https://github.com/rust-lang/crates.io-index" 1515 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 1516 | dependencies = [ 1517 | "try-lock", 1518 | ] 1519 | 1520 | [[package]] 1521 | name = "wasi" 1522 | version = "0.11.0+wasi-snapshot-preview1" 1523 | source = "registry+https://github.com/rust-lang/crates.io-index" 1524 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1525 | 1526 | [[package]] 1527 | name = "wasm-bindgen" 1528 | version = "0.2.93" 1529 | source = "registry+https://github.com/rust-lang/crates.io-index" 1530 | checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" 1531 | dependencies = [ 1532 | "cfg-if", 1533 | "once_cell", 1534 | "wasm-bindgen-macro", 1535 | ] 1536 | 1537 | [[package]] 1538 | name = "wasm-bindgen-backend" 1539 | version = "0.2.93" 1540 | source = "registry+https://github.com/rust-lang/crates.io-index" 1541 | checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" 1542 | dependencies = [ 1543 | "bumpalo", 1544 | "log", 1545 | "once_cell", 1546 | "proc-macro2", 1547 | "quote", 1548 | "syn", 1549 | "wasm-bindgen-shared", 1550 | ] 1551 | 1552 | [[package]] 1553 | name = "wasm-bindgen-futures" 1554 | version = "0.4.43" 1555 | source = "registry+https://github.com/rust-lang/crates.io-index" 1556 | checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" 1557 | dependencies = [ 1558 | "cfg-if", 1559 | "js-sys", 1560 | "wasm-bindgen", 1561 | "web-sys", 1562 | ] 1563 | 1564 | [[package]] 1565 | name = "wasm-bindgen-macro" 1566 | version = "0.2.93" 1567 | source = "registry+https://github.com/rust-lang/crates.io-index" 1568 | checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" 1569 | dependencies = [ 1570 | "quote", 1571 | "wasm-bindgen-macro-support", 1572 | ] 1573 | 1574 | [[package]] 1575 | name = "wasm-bindgen-macro-support" 1576 | version = "0.2.93" 1577 | source = "registry+https://github.com/rust-lang/crates.io-index" 1578 | checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" 1579 | dependencies = [ 1580 | "proc-macro2", 1581 | "quote", 1582 | "syn", 1583 | "wasm-bindgen-backend", 1584 | "wasm-bindgen-shared", 1585 | ] 1586 | 1587 | [[package]] 1588 | name = "wasm-bindgen-shared" 1589 | version = "0.2.93" 1590 | source = "registry+https://github.com/rust-lang/crates.io-index" 1591 | checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" 1592 | 1593 | [[package]] 1594 | name = "web-sys" 1595 | version = "0.3.70" 1596 | source = "registry+https://github.com/rust-lang/crates.io-index" 1597 | checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" 1598 | dependencies = [ 1599 | "js-sys", 1600 | "wasm-bindgen", 1601 | ] 1602 | 1603 | [[package]] 1604 | name = "webpki-roots" 1605 | version = "0.25.4" 1606 | source = "registry+https://github.com/rust-lang/crates.io-index" 1607 | checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" 1608 | 1609 | [[package]] 1610 | name = "windows-core" 1611 | version = "0.52.0" 1612 | source = "registry+https://github.com/rust-lang/crates.io-index" 1613 | checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" 1614 | dependencies = [ 1615 | "windows-targets 0.52.6", 1616 | ] 1617 | 1618 | [[package]] 1619 | name = "windows-sys" 1620 | version = "0.48.0" 1621 | source = "registry+https://github.com/rust-lang/crates.io-index" 1622 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1623 | dependencies = [ 1624 | "windows-targets 0.48.5", 1625 | ] 1626 | 1627 | [[package]] 1628 | name = "windows-sys" 1629 | version = "0.52.0" 1630 | source = "registry+https://github.com/rust-lang/crates.io-index" 1631 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1632 | dependencies = [ 1633 | "windows-targets 0.52.6", 1634 | ] 1635 | 1636 | [[package]] 1637 | name = "windows-sys" 1638 | version = "0.59.0" 1639 | source = "registry+https://github.com/rust-lang/crates.io-index" 1640 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 1641 | dependencies = [ 1642 | "windows-targets 0.52.6", 1643 | ] 1644 | 1645 | [[package]] 1646 | name = "windows-targets" 1647 | version = "0.48.5" 1648 | source = "registry+https://github.com/rust-lang/crates.io-index" 1649 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 1650 | dependencies = [ 1651 | "windows_aarch64_gnullvm 0.48.5", 1652 | "windows_aarch64_msvc 0.48.5", 1653 | "windows_i686_gnu 0.48.5", 1654 | "windows_i686_msvc 0.48.5", 1655 | "windows_x86_64_gnu 0.48.5", 1656 | "windows_x86_64_gnullvm 0.48.5", 1657 | "windows_x86_64_msvc 0.48.5", 1658 | ] 1659 | 1660 | [[package]] 1661 | name = "windows-targets" 1662 | version = "0.52.6" 1663 | source = "registry+https://github.com/rust-lang/crates.io-index" 1664 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 1665 | dependencies = [ 1666 | "windows_aarch64_gnullvm 0.52.6", 1667 | "windows_aarch64_msvc 0.52.6", 1668 | "windows_i686_gnu 0.52.6", 1669 | "windows_i686_gnullvm", 1670 | "windows_i686_msvc 0.52.6", 1671 | "windows_x86_64_gnu 0.52.6", 1672 | "windows_x86_64_gnullvm 0.52.6", 1673 | "windows_x86_64_msvc 0.52.6", 1674 | ] 1675 | 1676 | [[package]] 1677 | name = "windows_aarch64_gnullvm" 1678 | version = "0.48.5" 1679 | source = "registry+https://github.com/rust-lang/crates.io-index" 1680 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 1681 | 1682 | [[package]] 1683 | name = "windows_aarch64_gnullvm" 1684 | version = "0.52.6" 1685 | source = "registry+https://github.com/rust-lang/crates.io-index" 1686 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 1687 | 1688 | [[package]] 1689 | name = "windows_aarch64_msvc" 1690 | version = "0.48.5" 1691 | source = "registry+https://github.com/rust-lang/crates.io-index" 1692 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 1693 | 1694 | [[package]] 1695 | name = "windows_aarch64_msvc" 1696 | version = "0.52.6" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 1699 | 1700 | [[package]] 1701 | name = "windows_i686_gnu" 1702 | version = "0.48.5" 1703 | source = "registry+https://github.com/rust-lang/crates.io-index" 1704 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 1705 | 1706 | [[package]] 1707 | name = "windows_i686_gnu" 1708 | version = "0.52.6" 1709 | source = "registry+https://github.com/rust-lang/crates.io-index" 1710 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 1711 | 1712 | [[package]] 1713 | name = "windows_i686_gnullvm" 1714 | version = "0.52.6" 1715 | source = "registry+https://github.com/rust-lang/crates.io-index" 1716 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 1717 | 1718 | [[package]] 1719 | name = "windows_i686_msvc" 1720 | version = "0.48.5" 1721 | source = "registry+https://github.com/rust-lang/crates.io-index" 1722 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 1723 | 1724 | [[package]] 1725 | name = "windows_i686_msvc" 1726 | version = "0.52.6" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 1729 | 1730 | [[package]] 1731 | name = "windows_x86_64_gnu" 1732 | version = "0.48.5" 1733 | source = "registry+https://github.com/rust-lang/crates.io-index" 1734 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 1735 | 1736 | [[package]] 1737 | name = "windows_x86_64_gnu" 1738 | version = "0.52.6" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 1741 | 1742 | [[package]] 1743 | name = "windows_x86_64_gnullvm" 1744 | version = "0.48.5" 1745 | source = "registry+https://github.com/rust-lang/crates.io-index" 1746 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 1747 | 1748 | [[package]] 1749 | name = "windows_x86_64_gnullvm" 1750 | version = "0.52.6" 1751 | source = "registry+https://github.com/rust-lang/crates.io-index" 1752 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 1753 | 1754 | [[package]] 1755 | name = "windows_x86_64_msvc" 1756 | version = "0.48.5" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 1759 | 1760 | [[package]] 1761 | name = "windows_x86_64_msvc" 1762 | version = "0.52.6" 1763 | source = "registry+https://github.com/rust-lang/crates.io-index" 1764 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 1765 | 1766 | [[package]] 1767 | name = "winreg" 1768 | version = "0.50.0" 1769 | source = "registry+https://github.com/rust-lang/crates.io-index" 1770 | checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 1771 | dependencies = [ 1772 | "cfg-if", 1773 | "windows-sys 0.48.0", 1774 | ] 1775 | 1776 | [[package]] 1777 | name = "zerocopy" 1778 | version = "0.7.35" 1779 | source = "registry+https://github.com/rust-lang/crates.io-index" 1780 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 1781 | dependencies = [ 1782 | "byteorder", 1783 | "zerocopy-derive", 1784 | ] 1785 | 1786 | [[package]] 1787 | name = "zerocopy-derive" 1788 | version = "0.7.35" 1789 | source = "registry+https://github.com/rust-lang/crates.io-index" 1790 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 1791 | dependencies = [ 1792 | "proc-macro2", 1793 | "quote", 1794 | "syn", 1795 | ] 1796 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "decap_oauth" 3 | version = "0.0.2" 4 | edition = "2021" 5 | authors = ["Augusto Gunsch "] 6 | license = "MIT" 7 | repository = "https://github.com/augustogunsch/decap_oauth" 8 | description = """ 9 | OAuth server for Decap CMS for GitHub. 10 | """ 11 | 12 | [dependencies] 13 | axum = "0.7" 14 | oauth2 = "4" 15 | reqwest = "0.11" 16 | tokio = { version = "1", features = ["full"] } 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2023 Augusto Lenz Gunsch 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | External OAuth provider for Decap CMS. The following environment variables must be set for it to 2 | work: 3 | 4 | ```shell 5 | OAUTH_CLIENT_ID=(insert_the_client_id) 6 | OAUTH_SECRET=(insert_the_secret) 7 | OAUTH_ORIGINS=www.example.com,oauth.mysite.com 8 | ``` 9 | 10 | Additionaly, when using a host provider other than GitHub, such as Gitlab, the following 11 | environment variables must be set: 12 | 13 | ```shell 14 | OAUTH_PROVIDER=gitlab 15 | OAUTH_HOSTNAME=https://gitlab.com 16 | OAUTH_TOKEN_PATH=/oauth/token 17 | OAUTH_AUTHORIZE_PATH=/oauth/authorize 18 | OAUTH_SCOPES=api 19 | ``` 20 | 21 | When using GitHub Enterprise, please set `OAUTH_HOSTNAME` to the proper value. 22 | 23 | Documentation available on [docs.rs](https://docs.rs/decap_oauth/latest/decap_oauth/). 24 | -------------------------------------------------------------------------------- /src/bin/decap_oauth.rs: -------------------------------------------------------------------------------- 1 | use axum::Router; 2 | use decap_oauth::oauth_router; 3 | use std::env; 4 | use std::process::exit; 5 | use tokio::net::TcpListener; 6 | 7 | struct Args { 8 | port: usize, 9 | } 10 | 11 | fn usage_exit(exit_code: i32) -> ! { 12 | eprintln!("usage: decap_oauth [--port PORT] [--help]"); 13 | exit(exit_code); 14 | } 15 | 16 | fn parse_args() -> Args { 17 | let mut port = 3005; 18 | 19 | let args: Vec = env::args().skip(1).collect(); 20 | for (i, arg) in args.iter().enumerate() { 21 | match arg.as_str() { 22 | "--help" => usage_exit(0), 23 | "--port" => match args.get(i + 1) { 24 | Some(port_arg) => match port_arg.parse::() { 25 | Ok(result) => port = result, 26 | Err(_) => { 27 | eprintln!("Provided port is not an integer"); 28 | exit(1); 29 | } 30 | }, 31 | None => usage_exit(1), 32 | }, 33 | _ => {} 34 | } 35 | } 36 | 37 | Args { port } 38 | } 39 | 40 | fn check_var(var: &str) { 41 | if let Err(_) = env::var(var) { 42 | eprintln!("error: undefined environment variable `{}`.", var); 43 | exit(1); 44 | } 45 | } 46 | 47 | #[tokio::main] 48 | async fn main() { 49 | check_var("OAUTH_CLIENT_ID"); 50 | check_var("OAUTH_SECRET"); 51 | check_var("OAUTH_ORIGINS"); 52 | 53 | let app = Router::new().merge(oauth_router()); 54 | 55 | let args = parse_args(); 56 | 57 | let address = format!("0.0.0.0:{}", args.port); 58 | let listener = TcpListener::bind(address).await.unwrap(); 59 | 60 | println!("Server listening on port {}...", args.port); 61 | 62 | axum::serve(listener, app).await.unwrap(); 63 | } 64 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! External OAuth provider for Decap CMS. The following environment variables must be set for it to 2 | //! work: 3 | //! 4 | //! ```shell 5 | //! OAUTH_CLIENT_ID=(insert_the_client_id) 6 | //! OAUTH_SECRET=(insert_the_secret) 7 | //! OAUTH_ORIGINS=www.example.com,oauth.mysite.com 8 | //! ``` 9 | //! 10 | //! Additionaly, when using a host provider other than GitHub, such as Gitlab, the following 11 | //! environment variables must be set: 12 | //! 13 | //! ```shell 14 | //! OAUTH_PROVIDER=gitlab 15 | //! OAUTH_HOSTNAME=https://gitlab.com 16 | //! OAUTH_TOKEN_PATH=/oauth/token 17 | //! OAUTH_AUTHORIZE_PATH=/oauth/authorize 18 | //! OAUTH_SCOPES=api 19 | //! ``` 20 | //! 21 | //! When using GitHub Enterprise, please set `OAUTH_HOSTNAME` to the proper value. 22 | 23 | use axum::{ 24 | extract::Query, 25 | http::{HeaderMap, StatusCode}, 26 | response::{Html, IntoResponse, Redirect, Response}, 27 | routing, Router, 28 | }; 29 | use oauth2::{ 30 | basic::BasicClient, reqwest::http_client, AccessToken, AuthUrl, AuthorizationCode, ClientId, 31 | ClientSecret, CsrfToken, RedirectUrl, Scope, TokenResponse, TokenUrl, 32 | }; 33 | use std::collections::HashMap; 34 | use std::env; 35 | 36 | const OAUTH_HOSTNAME: &str = "https://github.com"; 37 | const OAUTH_TOKEN_PATH: &str = "/login/oauth/access_token"; 38 | const OAUTH_AUTHORIZE_PATH: &str = "/login/oauth/authorize"; 39 | const OAUTH_PROVIDER: &str = "github"; 40 | const OAUTH_SCOPES: &str = "repo"; 41 | 42 | fn get_var(var: &str) -> String { 43 | env::var(var).expect(format!("{} environment variable should be defined", var).as_str()) 44 | } 45 | 46 | fn get_var_or(var: &str, default: &str) -> String { 47 | env::var(var).unwrap_or(default.to_string()) 48 | } 49 | 50 | fn create_client(redirect_url: String) -> BasicClient { 51 | let client_id = get_var("OAUTH_CLIENT_ID"); 52 | let secret = get_var("OAUTH_SECRET"); 53 | let hostname = get_var_or("OAUTH_HOSTNAME", OAUTH_HOSTNAME); 54 | let token_path = get_var_or("OAUTH_TOKEN_PATH", OAUTH_TOKEN_PATH); 55 | let auth_path = get_var_or("OAUTH_AUTHORIZE_PATH", OAUTH_AUTHORIZE_PATH); 56 | 57 | BasicClient::new( 58 | ClientId::new(client_id), 59 | Some(ClientSecret::new(secret)), 60 | AuthUrl::new(format!("{}{}", hostname, auth_path)).expect("Auth URL should be a valid URL"), 61 | Some( 62 | TokenUrl::new(format!("{}{}", hostname, token_path)) 63 | .expect("Token URL should be a valid URL"), 64 | ), 65 | ) 66 | .set_redirect_uri(RedirectUrl::new(redirect_url).expect("Invalid redirect URL")) 67 | } 68 | 69 | /// The auth route. 70 | pub async fn auth(Query(params): Query>, headers: HeaderMap) -> Response { 71 | let expected_provider = get_var_or("OAUTH_PROVIDER", OAUTH_PROVIDER); 72 | 73 | let provider = match params.get("provider") { 74 | Some(provider) => provider.to_string(), 75 | None => match env::var("OAUTH_PROVIDER") { 76 | Ok(var) => var, 77 | Err(_) => { 78 | return (StatusCode::BAD_REQUEST, "No provider specified".to_string()) 79 | .into_response() 80 | } 81 | }, 82 | }; 83 | 84 | // This check is not strictly needed 85 | if provider != expected_provider { 86 | return ( 87 | StatusCode::BAD_REQUEST, 88 | format!("Unexpected provider `{}`", provider), 89 | ) 90 | .into_response(); 91 | } 92 | 93 | let scope = match params.get("scope") { 94 | Some(scope) => scope.to_owned(), 95 | None => get_var_or("OAUTH_SCOPES", OAUTH_SCOPES), 96 | }; 97 | 98 | let host = match headers.get("host") { 99 | Some(host) => host.to_str().unwrap(), 100 | None => return (StatusCode::BAD_REQUEST, "No host header".to_string()).into_response(), 101 | }; 102 | 103 | let redirect_url = format!("https://{}/callback?provider={}", host, provider); 104 | 105 | let client = create_client(redirect_url); 106 | 107 | let (auth_url, _csrf_state) = client 108 | .authorize_url(CsrfToken::new_random) 109 | .add_scope(Scope::new(scope)) 110 | .url(); 111 | 112 | Redirect::to(&auth_url.to_string()).into_response() 113 | } 114 | 115 | fn login_response(provider: &str, status: &str, token: &AccessToken) -> Html { 116 | let origins = get_var("OAUTH_ORIGINS"); 117 | 118 | Html(format!( 119 | r#" 120 | 146 | "#, 147 | origins, 148 | provider, 149 | status, 150 | token.secret(), 151 | provider, 152 | provider, 153 | )) 154 | } 155 | 156 | /// The callback route. 157 | pub async fn callback( 158 | Query(params): Query>, 159 | headers: HeaderMap, 160 | ) -> Response { 161 | let provider = match params.get("provider") { 162 | Some(provider) => provider.to_string(), 163 | None => match env::var("OAUTH_PROVIDER") { 164 | Ok(var) => var, 165 | Err(_) => { 166 | return (StatusCode::BAD_REQUEST, "No provider specified".to_string()) 167 | .into_response() 168 | } 169 | }, 170 | }; 171 | 172 | let code = match params.get("code") { 173 | Some(code) => AuthorizationCode::new(code.to_string()), 174 | None => return (StatusCode::BAD_REQUEST, "Code is required".to_string()).into_response(), 175 | }; 176 | 177 | let host = match headers.get("host") { 178 | Some(host) => host.to_str().unwrap(), 179 | None => return (StatusCode::BAD_REQUEST, "No host header".to_string()).into_response(), 180 | }; 181 | 182 | let redirect_url = format!("https://{}/callback?provider={}", host, provider); 183 | 184 | let client = create_client(redirect_url); 185 | 186 | match client.exchange_code(code).request(http_client) { 187 | Ok(token) => ( 188 | StatusCode::OK, 189 | login_response(&provider, "success", token.access_token()), 190 | ) 191 | .into_response(), 192 | Err(e) => { 193 | eprintln!("{:?}", e); 194 | (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()).into_response() 195 | } 196 | } 197 | } 198 | 199 | /// Return a full Axum router with both routes used by OAuth. 200 | pub fn oauth_router() -> Router { 201 | Router::new() 202 | .route("/auth", routing::get(auth)) 203 | .route("/callback", routing::get(callback)) 204 | } 205 | --------------------------------------------------------------------------------