advent of atproto

Project layout

Starter code and examples

+6
.env.template
··· 1 + DB_USER=postgres 2 + DB_PASSWORD=supersecurepassword123987 3 + DB_NAME=advent 4 + DATABASE_URL="postgresql://${DB_USER}:${DB_PASSWORD}@localhost:5432/${DB_NAME}" 5 + DOCKER_DB_URL="postgresql://${DB_USER}:${DB_PASSWORD}@host.docker.internal:5432/${DB_NAME}" 6 + REDIS_URL=redis://127.0.0.1:6379/
+5
.gitignore
··· 1 1 /target 2 + .idea 3 + .env 4 + at-advent.db 5 + at-advent.db-shm 6 + at-advent.db-wal
+3051 -21
Cargo.lock
··· 18 18 checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" 19 19 20 20 [[package]] 21 - name = "at-advent" 22 - version = "0.1.0" 21 + name = "aho-corasick" 22 + version = "1.1.3" 23 + source = "registry+https://github.com/rust-lang/crates.io-index" 24 + checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 23 25 dependencies = [ 24 - "axum", 26 + "memchr", 27 + ] 28 + 29 + [[package]] 30 + name = "allocator-api2" 31 + version = "0.2.21" 32 + source = "registry+https://github.com/rust-lang/crates.io-index" 33 + checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 34 + 35 + [[package]] 36 + name = "android-tzdata" 37 + version = "0.1.1" 38 + source = "registry+https://github.com/rust-lang/crates.io-index" 39 + checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 40 + 41 + [[package]] 42 + name = "android_system_properties" 43 + version = "0.1.5" 44 + source = "registry+https://github.com/rust-lang/crates.io-index" 45 + checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 46 + dependencies = [ 47 + "libc", 48 + ] 49 + 50 + [[package]] 51 + name = "async-compression" 52 + version = "0.4.27" 53 + source = "registry+https://github.com/rust-lang/crates.io-index" 54 + checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8" 55 + dependencies = [ 56 + "flate2", 57 + "futures-core", 58 + "memchr", 59 + "pin-project-lite", 60 + "tokio", 61 + ] 62 + 63 + [[package]] 64 + name = "async-lock" 65 + version = "3.4.0" 66 + source = "registry+https://github.com/rust-lang/crates.io-index" 67 + checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" 68 + dependencies = [ 69 + "event-listener", 70 + "event-listener-strategy", 71 + "pin-project-lite", 72 + ] 73 + 74 + [[package]] 75 + name = "async-trait" 76 + version = "0.1.88" 77 + source = "registry+https://github.com/rust-lang/crates.io-index" 78 + checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" 79 + dependencies = [ 80 + "proc-macro2", 81 + "quote", 82 + "syn", 83 + ] 84 + 85 + [[package]] 86 + name = "atoi" 87 + version = "2.0.0" 88 + source = "registry+https://github.com/rust-lang/crates.io-index" 89 + checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" 90 + dependencies = [ 91 + "num-traits", 92 + ] 93 + 94 + [[package]] 95 + name = "atrium-api" 96 + version = "0.25.4" 97 + source = "registry+https://github.com/rust-lang/crates.io-index" 98 + checksum = "46355d3245edc7b3160b2a45fe55d09a6963ebd3eee0252feb6b72fb0eb71463" 99 + dependencies = [ 100 + "atrium-common", 101 + "atrium-xrpc", 102 + "chrono", 103 + "http", 104 + "ipld-core", 105 + "langtag", 106 + "regex", 107 + "serde", 108 + "serde_bytes", 25 109 "serde_json", 110 + "thiserror 1.0.69", 26 111 "tokio", 112 + "trait-variant", 113 + ] 114 + 115 + [[package]] 116 + name = "atrium-common" 117 + version = "0.1.2" 118 + source = "registry+https://github.com/rust-lang/crates.io-index" 119 + checksum = "9ed5610654043faa396a5a15afac0ac646d76aebe45aebd7cef4f8b96b0ab7f4" 120 + dependencies = [ 121 + "dashmap", 122 + "lru", 123 + "moka", 124 + "thiserror 1.0.69", 125 + "tokio", 126 + "trait-variant", 127 + "web-time", 128 + ] 129 + 130 + [[package]] 131 + name = "atrium-identity" 132 + version = "0.1.5" 133 + source = "registry+https://github.com/rust-lang/crates.io-index" 134 + checksum = "c9e2d42bb4dbea038f4f5f45e3af2a89d61a9894a75f06aa550b74a60d2be380" 135 + dependencies = [ 136 + "atrium-api", 137 + "atrium-common", 138 + "atrium-xrpc", 139 + "serde", 140 + "serde_html_form", 141 + "serde_json", 142 + "thiserror 1.0.69", 143 + "trait-variant", 144 + ] 145 + 146 + [[package]] 147 + name = "atrium-oauth" 148 + version = "0.1.3" 149 + source = "registry+https://github.com/rust-lang/crates.io-index" 150 + checksum = "ca22dc4eaf77fd9bf050b21192ac58cd654a437d28e000ec114ebd93a51d36f5" 151 + dependencies = [ 152 + "atrium-api", 153 + "atrium-common", 154 + "atrium-identity", 155 + "atrium-xrpc", 156 + "base64", 157 + "chrono", 158 + "dashmap", 159 + "ecdsa", 160 + "elliptic-curve", 161 + "jose-jwa", 162 + "jose-jwk", 163 + "p256", 164 + "rand", 165 + "reqwest", 166 + "serde", 167 + "serde_html_form", 168 + "serde_json", 169 + "sha2", 170 + "thiserror 1.0.69", 171 + "tokio", 172 + "trait-variant", 173 + ] 174 + 175 + [[package]] 176 + name = "atrium-xrpc" 177 + version = "0.12.3" 178 + source = "registry+https://github.com/rust-lang/crates.io-index" 179 + checksum = "0216ad50ce34e9ff982e171c3659e65dedaa2ed5ac2994524debdc9a9647ffa8" 180 + dependencies = [ 181 + "http", 182 + "serde", 183 + "serde_html_form", 184 + "serde_json", 185 + "thiserror 1.0.69", 186 + "trait-variant", 27 187 ] 28 188 29 189 [[package]] ··· 98 258 "miniz_oxide", 99 259 "object", 100 260 "rustc-demangle", 101 - "windows-targets", 261 + "windows-targets 0.52.6", 262 + ] 263 + 264 + [[package]] 265 + name = "base-x" 266 + version = "0.2.11" 267 + source = "registry+https://github.com/rust-lang/crates.io-index" 268 + checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" 269 + 270 + [[package]] 271 + name = "base16ct" 272 + version = "0.2.0" 273 + source = "registry+https://github.com/rust-lang/crates.io-index" 274 + checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" 275 + 276 + [[package]] 277 + name = "base64" 278 + version = "0.22.1" 279 + source = "registry+https://github.com/rust-lang/crates.io-index" 280 + checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 281 + 282 + [[package]] 283 + name = "base64ct" 284 + version = "1.8.0" 285 + source = "registry+https://github.com/rust-lang/crates.io-index" 286 + checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" 287 + 288 + [[package]] 289 + name = "bb8" 290 + version = "0.9.0" 291 + source = "registry+https://github.com/rust-lang/crates.io-index" 292 + checksum = "212d8b8e1a22743d9241575c6ba822cf9c8fef34771c86ab7e477a4fbfd254e5" 293 + dependencies = [ 294 + "futures-util", 295 + "parking_lot", 296 + "tokio", 297 + ] 298 + 299 + [[package]] 300 + name = "bb8-redis" 301 + version = "0.24.0" 302 + source = "registry+https://github.com/rust-lang/crates.io-index" 303 + checksum = "5143936af5e1eea1a881e3e3d21b6777da6315e5e307bc3d0c2301c44fa37da9" 304 + dependencies = [ 305 + "bb8", 306 + "redis", 102 307 ] 103 308 104 309 [[package]] ··· 106 311 version = "2.9.1" 107 312 source = "registry+https://github.com/rust-lang/crates.io-index" 108 313 checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" 314 + dependencies = [ 315 + "serde", 316 + ] 317 + 318 + [[package]] 319 + name = "block-buffer" 320 + version = "0.10.4" 321 + source = "registry+https://github.com/rust-lang/crates.io-index" 322 + checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 323 + dependencies = [ 324 + "generic-array", 325 + ] 326 + 327 + [[package]] 328 + name = "bumpalo" 329 + version = "3.17.0" 330 + source = "registry+https://github.com/rust-lang/crates.io-index" 331 + checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 332 + 333 + [[package]] 334 + name = "byteorder" 335 + version = "1.5.0" 336 + source = "registry+https://github.com/rust-lang/crates.io-index" 337 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 109 338 110 339 [[package]] 111 340 name = "bytes" ··· 114 343 checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 115 344 116 345 [[package]] 346 + name = "cc" 347 + version = "1.2.30" 348 + source = "registry+https://github.com/rust-lang/crates.io-index" 349 + checksum = "deec109607ca693028562ed836a5f1c4b8bd77755c4e132fc5ce11b0b6211ae7" 350 + dependencies = [ 351 + "shlex", 352 + ] 353 + 354 + [[package]] 117 355 name = "cfg-if" 118 356 version = "1.0.1" 119 357 source = "registry+https://github.com/rust-lang/crates.io-index" 120 358 checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" 121 359 122 360 [[package]] 361 + name = "chrono" 362 + version = "0.4.41" 363 + source = "registry+https://github.com/rust-lang/crates.io-index" 364 + checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" 365 + dependencies = [ 366 + "android-tzdata", 367 + "iana-time-zone", 368 + "js-sys", 369 + "num-traits", 370 + "serde", 371 + "wasm-bindgen", 372 + "windows-link", 373 + ] 374 + 375 + [[package]] 376 + name = "cid" 377 + version = "0.11.1" 378 + source = "registry+https://github.com/rust-lang/crates.io-index" 379 + checksum = "3147d8272e8fa0ccd29ce51194dd98f79ddfb8191ba9e3409884e751798acf3a" 380 + dependencies = [ 381 + "core2", 382 + "multibase", 383 + "multihash", 384 + "serde", 385 + "serde_bytes", 386 + "unsigned-varint", 387 + ] 388 + 389 + [[package]] 390 + name = "combine" 391 + version = "4.6.7" 392 + source = "registry+https://github.com/rust-lang/crates.io-index" 393 + checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" 394 + dependencies = [ 395 + "bytes", 396 + "futures-core", 397 + "memchr", 398 + "pin-project-lite", 399 + "tokio", 400 + "tokio-util", 401 + ] 402 + 403 + [[package]] 404 + name = "concurrent-queue" 405 + version = "2.5.0" 406 + source = "registry+https://github.com/rust-lang/crates.io-index" 407 + checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 408 + dependencies = [ 409 + "crossbeam-utils", 410 + ] 411 + 412 + [[package]] 413 + name = "const-oid" 414 + version = "0.9.6" 415 + source = "registry+https://github.com/rust-lang/crates.io-index" 416 + checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 417 + 418 + [[package]] 419 + name = "cookie" 420 + version = "0.18.1" 421 + source = "registry+https://github.com/rust-lang/crates.io-index" 422 + checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" 423 + dependencies = [ 424 + "percent-encoding", 425 + "time", 426 + "version_check", 427 + ] 428 + 429 + [[package]] 430 + name = "core-foundation" 431 + version = "0.9.4" 432 + source = "registry+https://github.com/rust-lang/crates.io-index" 433 + checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 434 + dependencies = [ 435 + "core-foundation-sys", 436 + "libc", 437 + ] 438 + 439 + [[package]] 440 + name = "core-foundation-sys" 441 + version = "0.8.7" 442 + source = "registry+https://github.com/rust-lang/crates.io-index" 443 + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 444 + 445 + [[package]] 446 + name = "core2" 447 + version = "0.4.0" 448 + source = "registry+https://github.com/rust-lang/crates.io-index" 449 + checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" 450 + dependencies = [ 451 + "memchr", 452 + ] 453 + 454 + [[package]] 455 + name = "cpufeatures" 456 + version = "0.2.17" 457 + source = "registry+https://github.com/rust-lang/crates.io-index" 458 + checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 459 + dependencies = [ 460 + "libc", 461 + ] 462 + 463 + [[package]] 464 + name = "crc" 465 + version = "3.3.0" 466 + source = "registry+https://github.com/rust-lang/crates.io-index" 467 + checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" 468 + dependencies = [ 469 + "crc-catalog", 470 + ] 471 + 472 + [[package]] 473 + name = "crc-catalog" 474 + version = "2.4.0" 475 + source = "registry+https://github.com/rust-lang/crates.io-index" 476 + checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" 477 + 478 + [[package]] 479 + name = "crc32fast" 480 + version = "1.5.0" 481 + source = "registry+https://github.com/rust-lang/crates.io-index" 482 + checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 483 + dependencies = [ 484 + "cfg-if", 485 + ] 486 + 487 + [[package]] 488 + name = "crossbeam-channel" 489 + version = "0.5.15" 490 + source = "registry+https://github.com/rust-lang/crates.io-index" 491 + checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" 492 + dependencies = [ 493 + "crossbeam-utils", 494 + ] 495 + 496 + [[package]] 497 + name = "crossbeam-epoch" 498 + version = "0.9.18" 499 + source = "registry+https://github.com/rust-lang/crates.io-index" 500 + checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 501 + dependencies = [ 502 + "crossbeam-utils", 503 + ] 504 + 505 + [[package]] 506 + name = "crossbeam-queue" 507 + version = "0.3.12" 508 + source = "registry+https://github.com/rust-lang/crates.io-index" 509 + checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" 510 + dependencies = [ 511 + "crossbeam-utils", 512 + ] 513 + 514 + [[package]] 515 + name = "crossbeam-utils" 516 + version = "0.8.21" 517 + source = "registry+https://github.com/rust-lang/crates.io-index" 518 + checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 519 + 520 + [[package]] 521 + name = "crypto-bigint" 522 + version = "0.5.5" 523 + source = "registry+https://github.com/rust-lang/crates.io-index" 524 + checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" 525 + dependencies = [ 526 + "generic-array", 527 + "rand_core", 528 + "subtle", 529 + "zeroize", 530 + ] 531 + 532 + [[package]] 533 + name = "crypto-common" 534 + version = "0.1.6" 535 + source = "registry+https://github.com/rust-lang/crates.io-index" 536 + checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 537 + dependencies = [ 538 + "generic-array", 539 + "typenum", 540 + ] 541 + 542 + [[package]] 543 + name = "dashmap" 544 + version = "6.1.0" 545 + source = "registry+https://github.com/rust-lang/crates.io-index" 546 + checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" 547 + dependencies = [ 548 + "cfg-if", 549 + "crossbeam-utils", 550 + "hashbrown 0.14.5", 551 + "lock_api", 552 + "once_cell", 553 + "parking_lot_core", 554 + ] 555 + 556 + [[package]] 557 + name = "data-encoding" 558 + version = "2.9.0" 559 + source = "registry+https://github.com/rust-lang/crates.io-index" 560 + checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" 561 + 562 + [[package]] 563 + name = "data-encoding-macro" 564 + version = "0.1.18" 565 + source = "registry+https://github.com/rust-lang/crates.io-index" 566 + checksum = "47ce6c96ea0102f01122a185683611bd5ac8d99e62bc59dd12e6bda344ee673d" 567 + dependencies = [ 568 + "data-encoding", 569 + "data-encoding-macro-internal", 570 + ] 571 + 572 + [[package]] 573 + name = "data-encoding-macro-internal" 574 + version = "0.1.16" 575 + source = "registry+https://github.com/rust-lang/crates.io-index" 576 + checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" 577 + dependencies = [ 578 + "data-encoding", 579 + "syn", 580 + ] 581 + 582 + [[package]] 583 + name = "der" 584 + version = "0.7.10" 585 + source = "registry+https://github.com/rust-lang/crates.io-index" 586 + checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" 587 + dependencies = [ 588 + "const-oid", 589 + "pem-rfc7468", 590 + "zeroize", 591 + ] 592 + 593 + [[package]] 594 + name = "deranged" 595 + version = "0.4.0" 596 + source = "registry+https://github.com/rust-lang/crates.io-index" 597 + checksum = "9c9e6a11ca8224451684bc0d7d5a7adbf8f2fd6887261a1cfc3c0432f9d4068e" 598 + dependencies = [ 599 + "powerfmt", 600 + "serde", 601 + ] 602 + 603 + [[package]] 604 + name = "digest" 605 + version = "0.10.7" 606 + source = "registry+https://github.com/rust-lang/crates.io-index" 607 + checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 608 + dependencies = [ 609 + "block-buffer", 610 + "const-oid", 611 + "crypto-common", 612 + "subtle", 613 + ] 614 + 615 + [[package]] 616 + name = "displaydoc" 617 + version = "0.2.5" 618 + source = "registry+https://github.com/rust-lang/crates.io-index" 619 + checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 620 + dependencies = [ 621 + "proc-macro2", 622 + "quote", 623 + "syn", 624 + ] 625 + 626 + [[package]] 627 + name = "dotenv" 628 + version = "0.15.0" 629 + source = "registry+https://github.com/rust-lang/crates.io-index" 630 + checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 631 + 632 + [[package]] 633 + name = "dotenvy" 634 + version = "0.15.7" 635 + source = "registry+https://github.com/rust-lang/crates.io-index" 636 + checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" 637 + 638 + [[package]] 639 + name = "ecdsa" 640 + version = "0.16.9" 641 + source = "registry+https://github.com/rust-lang/crates.io-index" 642 + checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" 643 + dependencies = [ 644 + "der", 645 + "digest", 646 + "elliptic-curve", 647 + "rfc6979", 648 + "signature", 649 + ] 650 + 651 + [[package]] 652 + name = "either" 653 + version = "1.15.0" 654 + source = "registry+https://github.com/rust-lang/crates.io-index" 655 + checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 656 + dependencies = [ 657 + "serde", 658 + ] 659 + 660 + [[package]] 661 + name = "elliptic-curve" 662 + version = "0.13.8" 663 + source = "registry+https://github.com/rust-lang/crates.io-index" 664 + checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" 665 + dependencies = [ 666 + "base16ct", 667 + "crypto-bigint", 668 + "digest", 669 + "ff", 670 + "generic-array", 671 + "group", 672 + "rand_core", 673 + "sec1", 674 + "subtle", 675 + "zeroize", 676 + ] 677 + 678 + [[package]] 679 + name = "enum-as-inner" 680 + version = "0.6.1" 681 + source = "registry+https://github.com/rust-lang/crates.io-index" 682 + checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" 683 + dependencies = [ 684 + "heck", 685 + "proc-macro2", 686 + "quote", 687 + "syn", 688 + ] 689 + 690 + [[package]] 691 + name = "equivalent" 692 + version = "1.0.2" 693 + source = "registry+https://github.com/rust-lang/crates.io-index" 694 + checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 695 + 696 + [[package]] 697 + name = "errno" 698 + version = "0.3.13" 699 + source = "registry+https://github.com/rust-lang/crates.io-index" 700 + checksum = "778e2ac28f6c47af28e4907f13ffd1e1ddbd400980a9abd7c8df189bf578a5ad" 701 + dependencies = [ 702 + "libc", 703 + "windows-sys 0.59.0", 704 + ] 705 + 706 + [[package]] 707 + name = "etcetera" 708 + version = "0.8.0" 709 + source = "registry+https://github.com/rust-lang/crates.io-index" 710 + checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" 711 + dependencies = [ 712 + "cfg-if", 713 + "home", 714 + "windows-sys 0.48.0", 715 + ] 716 + 717 + [[package]] 718 + name = "event-listener" 719 + version = "5.4.0" 720 + source = "registry+https://github.com/rust-lang/crates.io-index" 721 + checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" 722 + dependencies = [ 723 + "concurrent-queue", 724 + "parking", 725 + "pin-project-lite", 726 + ] 727 + 728 + [[package]] 729 + name = "event-listener-strategy" 730 + version = "0.5.4" 731 + source = "registry+https://github.com/rust-lang/crates.io-index" 732 + checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" 733 + dependencies = [ 734 + "event-listener", 735 + "pin-project-lite", 736 + ] 737 + 738 + [[package]] 739 + name = "fastrand" 740 + version = "2.3.0" 741 + source = "registry+https://github.com/rust-lang/crates.io-index" 742 + checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 743 + 744 + [[package]] 745 + name = "ff" 746 + version = "0.13.1" 747 + source = "registry+https://github.com/rust-lang/crates.io-index" 748 + checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" 749 + dependencies = [ 750 + "rand_core", 751 + "subtle", 752 + ] 753 + 754 + [[package]] 755 + name = "flate2" 756 + version = "1.1.2" 757 + source = "registry+https://github.com/rust-lang/crates.io-index" 758 + checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" 759 + dependencies = [ 760 + "crc32fast", 761 + "miniz_oxide", 762 + ] 763 + 764 + [[package]] 765 + name = "flume" 766 + version = "0.11.1" 767 + source = "registry+https://github.com/rust-lang/crates.io-index" 768 + checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" 769 + dependencies = [ 770 + "futures-core", 771 + "futures-sink", 772 + "spin", 773 + ] 774 + 775 + [[package]] 123 776 name = "fnv" 124 777 version = "1.0.7" 125 778 source = "registry+https://github.com/rust-lang/crates.io-index" 126 779 checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 127 780 128 781 [[package]] 782 + name = "foldhash" 783 + version = "0.1.5" 784 + source = "registry+https://github.com/rust-lang/crates.io-index" 785 + checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 786 + 787 + [[package]] 788 + name = "foreign-types" 789 + version = "0.3.2" 790 + source = "registry+https://github.com/rust-lang/crates.io-index" 791 + checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 792 + dependencies = [ 793 + "foreign-types-shared", 794 + ] 795 + 796 + [[package]] 797 + name = "foreign-types-shared" 798 + version = "0.1.1" 799 + source = "registry+https://github.com/rust-lang/crates.io-index" 800 + checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 801 + 802 + [[package]] 129 803 name = "form_urlencoded" 130 804 version = "1.2.1" 131 805 source = "registry+https://github.com/rust-lang/crates.io-index" 132 806 checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 133 807 dependencies = [ 134 808 "percent-encoding", 809 + ] 810 + 811 + [[package]] 812 + name = "futures" 813 + version = "0.3.31" 814 + source = "registry+https://github.com/rust-lang/crates.io-index" 815 + checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 816 + dependencies = [ 817 + "futures-channel", 818 + "futures-core", 819 + "futures-io", 820 + "futures-sink", 821 + "futures-task", 822 + "futures-util", 135 823 ] 136 824 137 825 [[package]] ··· 141 829 checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 142 830 dependencies = [ 143 831 "futures-core", 832 + "futures-sink", 144 833 ] 145 834 146 835 [[package]] ··· 150 839 checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 151 840 152 841 [[package]] 842 + name = "futures-executor" 843 + version = "0.3.31" 844 + source = "registry+https://github.com/rust-lang/crates.io-index" 845 + checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 846 + dependencies = [ 847 + "futures-core", 848 + "futures-task", 849 + "futures-util", 850 + ] 851 + 852 + [[package]] 853 + name = "futures-intrusive" 854 + version = "0.5.0" 855 + source = "registry+https://github.com/rust-lang/crates.io-index" 856 + checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" 857 + dependencies = [ 858 + "futures-core", 859 + "lock_api", 860 + "parking_lot", 861 + ] 862 + 863 + [[package]] 864 + name = "futures-io" 865 + version = "0.3.31" 866 + source = "registry+https://github.com/rust-lang/crates.io-index" 867 + checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 868 + 869 + [[package]] 870 + name = "futures-macro" 871 + version = "0.3.31" 872 + source = "registry+https://github.com/rust-lang/crates.io-index" 873 + checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 874 + dependencies = [ 875 + "proc-macro2", 876 + "quote", 877 + "syn", 878 + ] 879 + 880 + [[package]] 881 + name = "futures-sink" 882 + version = "0.3.31" 883 + source = "registry+https://github.com/rust-lang/crates.io-index" 884 + checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 885 + 886 + [[package]] 153 887 name = "futures-task" 154 888 version = "0.3.31" 155 889 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 162 896 checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 163 897 dependencies = [ 164 898 "futures-core", 899 + "futures-io", 900 + "futures-macro", 901 + "futures-sink", 165 902 "futures-task", 903 + "memchr", 166 904 "pin-project-lite", 167 905 "pin-utils", 906 + "slab", 907 + ] 908 + 909 + [[package]] 910 + name = "generator" 911 + version = "0.8.5" 912 + source = "registry+https://github.com/rust-lang/crates.io-index" 913 + checksum = "d18470a76cb7f8ff746cf1f7470914f900252ec36bbc40b569d74b1258446827" 914 + dependencies = [ 915 + "cc", 916 + "cfg-if", 917 + "libc", 918 + "log", 919 + "rustversion", 920 + "windows", 921 + ] 922 + 923 + [[package]] 924 + name = "generic-array" 925 + version = "0.14.7" 926 + source = "registry+https://github.com/rust-lang/crates.io-index" 927 + checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 928 + dependencies = [ 929 + "typenum", 930 + "version_check", 931 + "zeroize", 932 + ] 933 + 934 + [[package]] 935 + name = "getrandom" 936 + version = "0.2.16" 937 + source = "registry+https://github.com/rust-lang/crates.io-index" 938 + checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 939 + dependencies = [ 940 + "cfg-if", 941 + "libc", 942 + "wasi 0.11.1+wasi-snapshot-preview1", 943 + ] 944 + 945 + [[package]] 946 + name = "getrandom" 947 + version = "0.3.3" 948 + source = "registry+https://github.com/rust-lang/crates.io-index" 949 + checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" 950 + dependencies = [ 951 + "cfg-if", 952 + "libc", 953 + "r-efi", 954 + "wasi 0.14.2+wasi-0.2.4", 168 955 ] 169 956 170 957 [[package]] ··· 174 961 checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 175 962 176 963 [[package]] 964 + name = "group" 965 + version = "0.13.0" 966 + source = "registry+https://github.com/rust-lang/crates.io-index" 967 + checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" 968 + dependencies = [ 969 + "ff", 970 + "rand_core", 971 + "subtle", 972 + ] 973 + 974 + [[package]] 975 + name = "hashbrown" 976 + version = "0.14.5" 977 + source = "registry+https://github.com/rust-lang/crates.io-index" 978 + checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 979 + 980 + [[package]] 981 + name = "hashbrown" 982 + version = "0.15.4" 983 + source = "registry+https://github.com/rust-lang/crates.io-index" 984 + checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5" 985 + dependencies = [ 986 + "allocator-api2", 987 + "equivalent", 988 + "foldhash", 989 + ] 990 + 991 + [[package]] 992 + name = "hashlink" 993 + version = "0.10.0" 994 + source = "registry+https://github.com/rust-lang/crates.io-index" 995 + checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" 996 + dependencies = [ 997 + "hashbrown 0.15.4", 998 + ] 999 + 1000 + [[package]] 1001 + name = "heck" 1002 + version = "0.5.0" 1003 + source = "registry+https://github.com/rust-lang/crates.io-index" 1004 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1005 + 1006 + [[package]] 1007 + name = "hex" 1008 + version = "0.4.3" 1009 + source = "registry+https://github.com/rust-lang/crates.io-index" 1010 + checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1011 + 1012 + [[package]] 1013 + name = "hickory-proto" 1014 + version = "0.24.4" 1015 + source = "registry+https://github.com/rust-lang/crates.io-index" 1016 + checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248" 1017 + dependencies = [ 1018 + "async-trait", 1019 + "cfg-if", 1020 + "data-encoding", 1021 + "enum-as-inner", 1022 + "futures-channel", 1023 + "futures-io", 1024 + "futures-util", 1025 + "idna", 1026 + "ipnet", 1027 + "once_cell", 1028 + "rand", 1029 + "thiserror 1.0.69", 1030 + "tinyvec", 1031 + "tokio", 1032 + "tracing", 1033 + "url", 1034 + ] 1035 + 1036 + [[package]] 1037 + name = "hickory-resolver" 1038 + version = "0.24.4" 1039 + source = "registry+https://github.com/rust-lang/crates.io-index" 1040 + checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" 1041 + dependencies = [ 1042 + "cfg-if", 1043 + "futures-util", 1044 + "hickory-proto", 1045 + "ipconfig", 1046 + "lru-cache", 1047 + "once_cell", 1048 + "parking_lot", 1049 + "rand", 1050 + "resolv-conf", 1051 + "smallvec", 1052 + "thiserror 1.0.69", 1053 + "tokio", 1054 + "tracing", 1055 + ] 1056 + 1057 + [[package]] 1058 + name = "hkdf" 1059 + version = "0.12.4" 1060 + source = "registry+https://github.com/rust-lang/crates.io-index" 1061 + checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" 1062 + dependencies = [ 1063 + "hmac", 1064 + ] 1065 + 1066 + [[package]] 1067 + name = "hmac" 1068 + version = "0.12.1" 1069 + source = "registry+https://github.com/rust-lang/crates.io-index" 1070 + checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1071 + dependencies = [ 1072 + "digest", 1073 + ] 1074 + 1075 + [[package]] 1076 + name = "home" 1077 + version = "0.5.11" 1078 + source = "registry+https://github.com/rust-lang/crates.io-index" 1079 + checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" 1080 + dependencies = [ 1081 + "windows-sys 0.59.0", 1082 + ] 1083 + 1084 + [[package]] 177 1085 name = "http" 178 1086 version = "1.3.1" 179 1087 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 236 1144 "pin-project-lite", 237 1145 "smallvec", 238 1146 "tokio", 1147 + "want", 1148 + ] 1149 + 1150 + [[package]] 1151 + name = "hyper-tls" 1152 + version = "0.6.0" 1153 + source = "registry+https://github.com/rust-lang/crates.io-index" 1154 + checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" 1155 + dependencies = [ 1156 + "bytes", 1157 + "http-body-util", 1158 + "hyper", 1159 + "hyper-util", 1160 + "native-tls", 1161 + "tokio", 1162 + "tokio-native-tls", 1163 + "tower-service", 239 1164 ] 240 1165 241 1166 [[package]] ··· 244 1169 source = "registry+https://github.com/rust-lang/crates.io-index" 245 1170 checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" 246 1171 dependencies = [ 1172 + "base64", 247 1173 "bytes", 1174 + "futures-channel", 248 1175 "futures-core", 1176 + "futures-util", 249 1177 "http", 250 1178 "http-body", 251 1179 "hyper", 1180 + "ipnet", 1181 + "libc", 1182 + "percent-encoding", 252 1183 "pin-project-lite", 1184 + "socket2 0.6.0", 253 1185 "tokio", 254 1186 "tower-service", 1187 + "tracing", 1188 + ] 1189 + 1190 + [[package]] 1191 + name = "iana-time-zone" 1192 + version = "0.1.63" 1193 + source = "registry+https://github.com/rust-lang/crates.io-index" 1194 + checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 1195 + dependencies = [ 1196 + "android_system_properties", 1197 + "core-foundation-sys", 1198 + "iana-time-zone-haiku", 1199 + "js-sys", 1200 + "log", 1201 + "wasm-bindgen", 1202 + "windows-core", 1203 + ] 1204 + 1205 + [[package]] 1206 + name = "iana-time-zone-haiku" 1207 + version = "0.1.2" 1208 + source = "registry+https://github.com/rust-lang/crates.io-index" 1209 + checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 1210 + dependencies = [ 1211 + "cc", 1212 + ] 1213 + 1214 + [[package]] 1215 + name = "icu_collections" 1216 + version = "2.0.0" 1217 + source = "registry+https://github.com/rust-lang/crates.io-index" 1218 + checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" 1219 + dependencies = [ 1220 + "displaydoc", 1221 + "potential_utf", 1222 + "yoke", 1223 + "zerofrom", 1224 + "zerovec", 1225 + ] 1226 + 1227 + [[package]] 1228 + name = "icu_locale_core" 1229 + version = "2.0.0" 1230 + source = "registry+https://github.com/rust-lang/crates.io-index" 1231 + checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" 1232 + dependencies = [ 1233 + "displaydoc", 1234 + "litemap", 1235 + "tinystr", 1236 + "writeable", 1237 + "zerovec", 1238 + ] 1239 + 1240 + [[package]] 1241 + name = "icu_normalizer" 1242 + version = "2.0.0" 1243 + source = "registry+https://github.com/rust-lang/crates.io-index" 1244 + checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" 1245 + dependencies = [ 1246 + "displaydoc", 1247 + "icu_collections", 1248 + "icu_normalizer_data", 1249 + "icu_properties", 1250 + "icu_provider", 1251 + "smallvec", 1252 + "zerovec", 1253 + ] 1254 + 1255 + [[package]] 1256 + name = "icu_normalizer_data" 1257 + version = "2.0.0" 1258 + source = "registry+https://github.com/rust-lang/crates.io-index" 1259 + checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" 1260 + 1261 + [[package]] 1262 + name = "icu_properties" 1263 + version = "2.0.1" 1264 + source = "registry+https://github.com/rust-lang/crates.io-index" 1265 + checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" 1266 + dependencies = [ 1267 + "displaydoc", 1268 + "icu_collections", 1269 + "icu_locale_core", 1270 + "icu_properties_data", 1271 + "icu_provider", 1272 + "potential_utf", 1273 + "zerotrie", 1274 + "zerovec", 1275 + ] 1276 + 1277 + [[package]] 1278 + name = "icu_properties_data" 1279 + version = "2.0.1" 1280 + source = "registry+https://github.com/rust-lang/crates.io-index" 1281 + checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" 1282 + 1283 + [[package]] 1284 + name = "icu_provider" 1285 + version = "2.0.0" 1286 + source = "registry+https://github.com/rust-lang/crates.io-index" 1287 + checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" 1288 + dependencies = [ 1289 + "displaydoc", 1290 + "icu_locale_core", 1291 + "stable_deref_trait", 1292 + "tinystr", 1293 + "writeable", 1294 + "yoke", 1295 + "zerofrom", 1296 + "zerotrie", 1297 + "zerovec", 1298 + ] 1299 + 1300 + [[package]] 1301 + name = "idna" 1302 + version = "1.0.3" 1303 + source = "registry+https://github.com/rust-lang/crates.io-index" 1304 + checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" 1305 + dependencies = [ 1306 + "idna_adapter", 1307 + "smallvec", 1308 + "utf8_iter", 1309 + ] 1310 + 1311 + [[package]] 1312 + name = "idna_adapter" 1313 + version = "1.2.1" 1314 + source = "registry+https://github.com/rust-lang/crates.io-index" 1315 + checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" 1316 + dependencies = [ 1317 + "icu_normalizer", 1318 + "icu_properties", 1319 + ] 1320 + 1321 + [[package]] 1322 + name = "indexmap" 1323 + version = "2.10.0" 1324 + source = "registry+https://github.com/rust-lang/crates.io-index" 1325 + checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661" 1326 + dependencies = [ 1327 + "equivalent", 1328 + "hashbrown 0.15.4", 255 1329 ] 256 1330 257 1331 [[package]] ··· 266 1340 ] 267 1341 268 1342 [[package]] 1343 + name = "ipconfig" 1344 + version = "0.3.2" 1345 + source = "registry+https://github.com/rust-lang/crates.io-index" 1346 + checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" 1347 + dependencies = [ 1348 + "socket2 0.5.10", 1349 + "widestring", 1350 + "windows-sys 0.48.0", 1351 + "winreg", 1352 + ] 1353 + 1354 + [[package]] 1355 + name = "ipld-core" 1356 + version = "0.4.2" 1357 + source = "registry+https://github.com/rust-lang/crates.io-index" 1358 + checksum = "104718b1cc124d92a6d01ca9c9258a7df311405debb3408c445a36452f9bf8db" 1359 + dependencies = [ 1360 + "cid", 1361 + "serde", 1362 + "serde_bytes", 1363 + ] 1364 + 1365 + [[package]] 1366 + name = "ipnet" 1367 + version = "2.11.0" 1368 + source = "registry+https://github.com/rust-lang/crates.io-index" 1369 + checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 1370 + 1371 + [[package]] 1372 + name = "iri-string" 1373 + version = "0.7.8" 1374 + source = "registry+https://github.com/rust-lang/crates.io-index" 1375 + checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" 1376 + dependencies = [ 1377 + "memchr", 1378 + "serde", 1379 + ] 1380 + 1381 + [[package]] 269 1382 name = "itoa" 270 1383 version = "1.0.15" 271 1384 source = "registry+https://github.com/rust-lang/crates.io-index" 272 1385 checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 273 1386 274 1387 [[package]] 1388 + name = "jose-b64" 1389 + version = "0.1.2" 1390 + source = "registry+https://github.com/rust-lang/crates.io-index" 1391 + checksum = "bec69375368709666b21c76965ce67549f2d2db7605f1f8707d17c9656801b56" 1392 + dependencies = [ 1393 + "base64ct", 1394 + "serde", 1395 + "subtle", 1396 + "zeroize", 1397 + ] 1398 + 1399 + [[package]] 1400 + name = "jose-jwa" 1401 + version = "0.1.2" 1402 + source = "registry+https://github.com/rust-lang/crates.io-index" 1403 + checksum = "9ab78e053fe886a351d67cf0d194c000f9d0dcb92906eb34d853d7e758a4b3a7" 1404 + dependencies = [ 1405 + "serde", 1406 + ] 1407 + 1408 + [[package]] 1409 + name = "jose-jwk" 1410 + version = "0.1.2" 1411 + source = "registry+https://github.com/rust-lang/crates.io-index" 1412 + checksum = "280fa263807fe0782ecb6f2baadc28dffc04e00558a58e33bfdb801d11fd58e7" 1413 + dependencies = [ 1414 + "jose-b64", 1415 + "jose-jwa", 1416 + "p256", 1417 + "serde", 1418 + "zeroize", 1419 + ] 1420 + 1421 + [[package]] 1422 + name = "js-sys" 1423 + version = "0.3.77" 1424 + source = "registry+https://github.com/rust-lang/crates.io-index" 1425 + checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 1426 + dependencies = [ 1427 + "once_cell", 1428 + "wasm-bindgen", 1429 + ] 1430 + 1431 + [[package]] 1432 + name = "langtag" 1433 + version = "0.3.4" 1434 + source = "registry+https://github.com/rust-lang/crates.io-index" 1435 + checksum = "ed60c85f254d6ae8450cec15eedd921efbc4d1bdf6fcf6202b9a58b403f6f805" 1436 + dependencies = [ 1437 + "serde", 1438 + ] 1439 + 1440 + [[package]] 1441 + name = "lazy_static" 1442 + version = "1.5.0" 1443 + source = "registry+https://github.com/rust-lang/crates.io-index" 1444 + checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1445 + dependencies = [ 1446 + "spin", 1447 + ] 1448 + 1449 + [[package]] 275 1450 name = "libc" 276 1451 version = "0.2.174" 277 1452 source = "registry+https://github.com/rust-lang/crates.io-index" 278 1453 checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" 279 1454 280 1455 [[package]] 1456 + name = "libm" 1457 + version = "0.2.15" 1458 + source = "registry+https://github.com/rust-lang/crates.io-index" 1459 + checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" 1460 + 1461 + [[package]] 1462 + name = "libsqlite3-sys" 1463 + version = "0.30.1" 1464 + source = "registry+https://github.com/rust-lang/crates.io-index" 1465 + checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" 1466 + dependencies = [ 1467 + "pkg-config", 1468 + "vcpkg", 1469 + ] 1470 + 1471 + [[package]] 1472 + name = "linked-hash-map" 1473 + version = "0.5.6" 1474 + source = "registry+https://github.com/rust-lang/crates.io-index" 1475 + checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 1476 + 1477 + [[package]] 1478 + name = "linux-raw-sys" 1479 + version = "0.9.4" 1480 + source = "registry+https://github.com/rust-lang/crates.io-index" 1481 + checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" 1482 + 1483 + [[package]] 1484 + name = "listener" 1485 + version = "0.1.0" 1486 + 1487 + [[package]] 1488 + name = "litemap" 1489 + version = "0.8.0" 1490 + source = "registry+https://github.com/rust-lang/crates.io-index" 1491 + checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" 1492 + 1493 + [[package]] 281 1494 name = "lock_api" 282 1495 version = "0.4.13" 283 1496 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 285 1498 dependencies = [ 286 1499 "autocfg", 287 1500 "scopeguard", 1501 + "serde", 288 1502 ] 289 1503 290 1504 [[package]] ··· 294 1508 checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 295 1509 296 1510 [[package]] 1511 + name = "loom" 1512 + version = "0.7.2" 1513 + source = "registry+https://github.com/rust-lang/crates.io-index" 1514 + checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" 1515 + dependencies = [ 1516 + "cfg-if", 1517 + "generator", 1518 + "scoped-tls", 1519 + "tracing", 1520 + "tracing-subscriber", 1521 + ] 1522 + 1523 + [[package]] 1524 + name = "lru" 1525 + version = "0.12.5" 1526 + source = "registry+https://github.com/rust-lang/crates.io-index" 1527 + checksum = "234cf4f4a04dc1f57e24b96cc0cd600cf2af460d4161ac5ecdd0af8e1f3b2a38" 1528 + dependencies = [ 1529 + "hashbrown 0.15.4", 1530 + ] 1531 + 1532 + [[package]] 1533 + name = "lru-cache" 1534 + version = "0.1.2" 1535 + source = "registry+https://github.com/rust-lang/crates.io-index" 1536 + checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" 1537 + dependencies = [ 1538 + "linked-hash-map", 1539 + ] 1540 + 1541 + [[package]] 1542 + name = "matchers" 1543 + version = "0.1.0" 1544 + source = "registry+https://github.com/rust-lang/crates.io-index" 1545 + checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 1546 + dependencies = [ 1547 + "regex-automata 0.1.10", 1548 + ] 1549 + 1550 + [[package]] 297 1551 name = "matchit" 298 1552 version = "0.8.4" 299 1553 source = "registry+https://github.com/rust-lang/crates.io-index" 300 1554 checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 1555 + 1556 + [[package]] 1557 + name = "md-5" 1558 + version = "0.10.6" 1559 + source = "registry+https://github.com/rust-lang/crates.io-index" 1560 + checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" 1561 + dependencies = [ 1562 + "cfg-if", 1563 + "digest", 1564 + ] 301 1565 302 1566 [[package]] 303 1567 name = "memchr" ··· 327 1591 checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" 328 1592 dependencies = [ 329 1593 "libc", 330 - "wasi", 1594 + "wasi 0.11.1+wasi-snapshot-preview1", 331 1595 "windows-sys 0.59.0", 332 1596 ] 333 1597 334 1598 [[package]] 1599 + name = "moka" 1600 + version = "0.12.10" 1601 + source = "registry+https://github.com/rust-lang/crates.io-index" 1602 + checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926" 1603 + dependencies = [ 1604 + "async-lock", 1605 + "crossbeam-channel", 1606 + "crossbeam-epoch", 1607 + "crossbeam-utils", 1608 + "event-listener", 1609 + "futures-util", 1610 + "loom", 1611 + "parking_lot", 1612 + "portable-atomic", 1613 + "rustc_version", 1614 + "smallvec", 1615 + "tagptr", 1616 + "thiserror 1.0.69", 1617 + "uuid", 1618 + ] 1619 + 1620 + [[package]] 1621 + name = "multibase" 1622 + version = "0.9.1" 1623 + source = "registry+https://github.com/rust-lang/crates.io-index" 1624 + checksum = "9b3539ec3c1f04ac9748a260728e855f261b4977f5c3406612c884564f329404" 1625 + dependencies = [ 1626 + "base-x", 1627 + "data-encoding", 1628 + "data-encoding-macro", 1629 + ] 1630 + 1631 + [[package]] 1632 + name = "multihash" 1633 + version = "0.19.3" 1634 + source = "registry+https://github.com/rust-lang/crates.io-index" 1635 + checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" 1636 + dependencies = [ 1637 + "core2", 1638 + "serde", 1639 + "unsigned-varint", 1640 + ] 1641 + 1642 + [[package]] 1643 + name = "native-tls" 1644 + version = "0.2.14" 1645 + source = "registry+https://github.com/rust-lang/crates.io-index" 1646 + checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" 1647 + dependencies = [ 1648 + "libc", 1649 + "log", 1650 + "openssl", 1651 + "openssl-probe", 1652 + "openssl-sys", 1653 + "schannel", 1654 + "security-framework", 1655 + "security-framework-sys", 1656 + "tempfile", 1657 + ] 1658 + 1659 + [[package]] 1660 + name = "nu-ansi-term" 1661 + version = "0.46.0" 1662 + source = "registry+https://github.com/rust-lang/crates.io-index" 1663 + checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1664 + dependencies = [ 1665 + "overload", 1666 + "winapi", 1667 + ] 1668 + 1669 + [[package]] 1670 + name = "num-bigint" 1671 + version = "0.4.6" 1672 + source = "registry+https://github.com/rust-lang/crates.io-index" 1673 + checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 1674 + dependencies = [ 1675 + "num-integer", 1676 + "num-traits", 1677 + ] 1678 + 1679 + [[package]] 1680 + name = "num-bigint-dig" 1681 + version = "0.8.4" 1682 + source = "registry+https://github.com/rust-lang/crates.io-index" 1683 + checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" 1684 + dependencies = [ 1685 + "byteorder", 1686 + "lazy_static", 1687 + "libm", 1688 + "num-integer", 1689 + "num-iter", 1690 + "num-traits", 1691 + "rand", 1692 + "smallvec", 1693 + "zeroize", 1694 + ] 1695 + 1696 + [[package]] 1697 + name = "num-conv" 1698 + version = "0.1.0" 1699 + source = "registry+https://github.com/rust-lang/crates.io-index" 1700 + checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1701 + 1702 + [[package]] 1703 + name = "num-integer" 1704 + version = "0.1.46" 1705 + source = "registry+https://github.com/rust-lang/crates.io-index" 1706 + checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1707 + dependencies = [ 1708 + "num-traits", 1709 + ] 1710 + 1711 + [[package]] 1712 + name = "num-iter" 1713 + version = "0.1.45" 1714 + source = "registry+https://github.com/rust-lang/crates.io-index" 1715 + checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 1716 + dependencies = [ 1717 + "autocfg", 1718 + "num-integer", 1719 + "num-traits", 1720 + ] 1721 + 1722 + [[package]] 1723 + name = "num-traits" 1724 + version = "0.2.19" 1725 + source = "registry+https://github.com/rust-lang/crates.io-index" 1726 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1727 + dependencies = [ 1728 + "autocfg", 1729 + "libm", 1730 + ] 1731 + 1732 + [[package]] 335 1733 name = "object" 336 1734 version = "0.36.7" 337 1735 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 347 1745 checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 348 1746 349 1747 [[package]] 1748 + name = "openssl" 1749 + version = "0.10.73" 1750 + source = "registry+https://github.com/rust-lang/crates.io-index" 1751 + checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" 1752 + dependencies = [ 1753 + "bitflags", 1754 + "cfg-if", 1755 + "foreign-types", 1756 + "libc", 1757 + "once_cell", 1758 + "openssl-macros", 1759 + "openssl-sys", 1760 + ] 1761 + 1762 + [[package]] 1763 + name = "openssl-macros" 1764 + version = "0.1.1" 1765 + source = "registry+https://github.com/rust-lang/crates.io-index" 1766 + checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 1767 + dependencies = [ 1768 + "proc-macro2", 1769 + "quote", 1770 + "syn", 1771 + ] 1772 + 1773 + [[package]] 1774 + name = "openssl-probe" 1775 + version = "0.1.6" 1776 + source = "registry+https://github.com/rust-lang/crates.io-index" 1777 + checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 1778 + 1779 + [[package]] 1780 + name = "openssl-sys" 1781 + version = "0.9.109" 1782 + source = "registry+https://github.com/rust-lang/crates.io-index" 1783 + checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" 1784 + dependencies = [ 1785 + "cc", 1786 + "libc", 1787 + "pkg-config", 1788 + "vcpkg", 1789 + ] 1790 + 1791 + [[package]] 1792 + name = "overload" 1793 + version = "0.1.1" 1794 + source = "registry+https://github.com/rust-lang/crates.io-index" 1795 + checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1796 + 1797 + [[package]] 1798 + name = "p256" 1799 + version = "0.13.2" 1800 + source = "registry+https://github.com/rust-lang/crates.io-index" 1801 + checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" 1802 + dependencies = [ 1803 + "ecdsa", 1804 + "elliptic-curve", 1805 + "primeorder", 1806 + "sha2", 1807 + ] 1808 + 1809 + [[package]] 1810 + name = "parking" 1811 + version = "2.2.1" 1812 + source = "registry+https://github.com/rust-lang/crates.io-index" 1813 + checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" 1814 + 1815 + [[package]] 350 1816 name = "parking_lot" 351 1817 version = "0.12.4" 352 1818 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 366 1832 "libc", 367 1833 "redox_syscall", 368 1834 "smallvec", 369 - "windows-targets", 1835 + "windows-targets 0.52.6", 1836 + ] 1837 + 1838 + [[package]] 1839 + name = "pem-rfc7468" 1840 + version = "0.7.0" 1841 + source = "registry+https://github.com/rust-lang/crates.io-index" 1842 + checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" 1843 + dependencies = [ 1844 + "base64ct", 370 1845 ] 371 1846 372 1847 [[package]] ··· 388 1863 checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 389 1864 390 1865 [[package]] 1866 + name = "pkcs1" 1867 + version = "0.7.5" 1868 + source = "registry+https://github.com/rust-lang/crates.io-index" 1869 + checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" 1870 + dependencies = [ 1871 + "der", 1872 + "pkcs8", 1873 + "spki", 1874 + ] 1875 + 1876 + [[package]] 1877 + name = "pkcs8" 1878 + version = "0.10.2" 1879 + source = "registry+https://github.com/rust-lang/crates.io-index" 1880 + checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 1881 + dependencies = [ 1882 + "der", 1883 + "spki", 1884 + ] 1885 + 1886 + [[package]] 1887 + name = "pkg-config" 1888 + version = "0.3.32" 1889 + source = "registry+https://github.com/rust-lang/crates.io-index" 1890 + checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 1891 + 1892 + [[package]] 1893 + name = "portable-atomic" 1894 + version = "1.11.1" 1895 + source = "registry+https://github.com/rust-lang/crates.io-index" 1896 + checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" 1897 + 1898 + [[package]] 1899 + name = "potential_utf" 1900 + version = "0.1.2" 1901 + source = "registry+https://github.com/rust-lang/crates.io-index" 1902 + checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" 1903 + dependencies = [ 1904 + "zerovec", 1905 + ] 1906 + 1907 + [[package]] 1908 + name = "powerfmt" 1909 + version = "0.2.0" 1910 + source = "registry+https://github.com/rust-lang/crates.io-index" 1911 + checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 1912 + 1913 + [[package]] 1914 + name = "ppv-lite86" 1915 + version = "0.2.21" 1916 + source = "registry+https://github.com/rust-lang/crates.io-index" 1917 + checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 1918 + dependencies = [ 1919 + "zerocopy", 1920 + ] 1921 + 1922 + [[package]] 1923 + name = "primeorder" 1924 + version = "0.13.6" 1925 + source = "registry+https://github.com/rust-lang/crates.io-index" 1926 + checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" 1927 + dependencies = [ 1928 + "elliptic-curve", 1929 + ] 1930 + 1931 + [[package]] 391 1932 name = "proc-macro2" 392 1933 version = "1.0.95" 393 1934 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 406 1947 ] 407 1948 408 1949 [[package]] 1950 + name = "r-efi" 1951 + version = "5.3.0" 1952 + source = "registry+https://github.com/rust-lang/crates.io-index" 1953 + checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" 1954 + 1955 + [[package]] 1956 + name = "rand" 1957 + version = "0.8.5" 1958 + source = "registry+https://github.com/rust-lang/crates.io-index" 1959 + checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1960 + dependencies = [ 1961 + "libc", 1962 + "rand_chacha", 1963 + "rand_core", 1964 + ] 1965 + 1966 + [[package]] 1967 + name = "rand_chacha" 1968 + version = "0.3.1" 1969 + source = "registry+https://github.com/rust-lang/crates.io-index" 1970 + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1971 + dependencies = [ 1972 + "ppv-lite86", 1973 + "rand_core", 1974 + ] 1975 + 1976 + [[package]] 1977 + name = "rand_core" 1978 + version = "0.6.4" 1979 + source = "registry+https://github.com/rust-lang/crates.io-index" 1980 + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1981 + dependencies = [ 1982 + "getrandom 0.2.16", 1983 + ] 1984 + 1985 + [[package]] 1986 + name = "redis" 1987 + version = "0.32.4" 1988 + source = "registry+https://github.com/rust-lang/crates.io-index" 1989 + checksum = "e1f66bf4cac9733a23bcdf1e0e01effbaaad208567beba68be8f67e5f4af3ee1" 1990 + dependencies = [ 1991 + "bytes", 1992 + "cfg-if", 1993 + "combine", 1994 + "futures-util", 1995 + "itoa", 1996 + "num-bigint", 1997 + "percent-encoding", 1998 + "pin-project-lite", 1999 + "ryu", 2000 + "sha1_smol", 2001 + "socket2 0.6.0", 2002 + "tokio", 2003 + "tokio-util", 2004 + "url", 2005 + ] 2006 + 2007 + [[package]] 409 2008 name = "redox_syscall" 410 - version = "0.5.13" 2009 + version = "0.5.16" 411 2010 source = "registry+https://github.com/rust-lang/crates.io-index" 412 - checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" 2011 + checksum = "7251471db004e509f4e75a62cca9435365b5ec7bcdff530d612ac7c87c44a792" 413 2012 dependencies = [ 414 2013 "bitflags", 415 2014 ] 416 2015 417 2016 [[package]] 2017 + name = "regex" 2018 + version = "1.11.1" 2019 + source = "registry+https://github.com/rust-lang/crates.io-index" 2020 + checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 2021 + dependencies = [ 2022 + "aho-corasick", 2023 + "memchr", 2024 + "regex-automata 0.4.9", 2025 + "regex-syntax 0.8.5", 2026 + ] 2027 + 2028 + [[package]] 2029 + name = "regex-automata" 2030 + version = "0.1.10" 2031 + source = "registry+https://github.com/rust-lang/crates.io-index" 2032 + checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 2033 + dependencies = [ 2034 + "regex-syntax 0.6.29", 2035 + ] 2036 + 2037 + [[package]] 2038 + name = "regex-automata" 2039 + version = "0.4.9" 2040 + source = "registry+https://github.com/rust-lang/crates.io-index" 2041 + checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 2042 + dependencies = [ 2043 + "aho-corasick", 2044 + "memchr", 2045 + "regex-syntax 0.8.5", 2046 + ] 2047 + 2048 + [[package]] 2049 + name = "regex-syntax" 2050 + version = "0.6.29" 2051 + source = "registry+https://github.com/rust-lang/crates.io-index" 2052 + checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 2053 + 2054 + [[package]] 2055 + name = "regex-syntax" 2056 + version = "0.8.5" 2057 + source = "registry+https://github.com/rust-lang/crates.io-index" 2058 + checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 2059 + 2060 + [[package]] 2061 + name = "reqwest" 2062 + version = "0.12.22" 2063 + source = "registry+https://github.com/rust-lang/crates.io-index" 2064 + checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531" 2065 + dependencies = [ 2066 + "async-compression", 2067 + "base64", 2068 + "bytes", 2069 + "futures-core", 2070 + "futures-util", 2071 + "http", 2072 + "http-body", 2073 + "http-body-util", 2074 + "hyper", 2075 + "hyper-tls", 2076 + "hyper-util", 2077 + "js-sys", 2078 + "log", 2079 + "native-tls", 2080 + "percent-encoding", 2081 + "pin-project-lite", 2082 + "rustls-pki-types", 2083 + "serde", 2084 + "serde_json", 2085 + "serde_urlencoded", 2086 + "sync_wrapper", 2087 + "tokio", 2088 + "tokio-native-tls", 2089 + "tokio-util", 2090 + "tower", 2091 + "tower-http", 2092 + "tower-service", 2093 + "url", 2094 + "wasm-bindgen", 2095 + "wasm-bindgen-futures", 2096 + "web-sys", 2097 + ] 2098 + 2099 + [[package]] 2100 + name = "resolv-conf" 2101 + version = "0.7.4" 2102 + source = "registry+https://github.com/rust-lang/crates.io-index" 2103 + checksum = "95325155c684b1c89f7765e30bc1c42e4a6da51ca513615660cb8a62ef9a88e3" 2104 + 2105 + [[package]] 2106 + name = "rfc6979" 2107 + version = "0.4.0" 2108 + source = "registry+https://github.com/rust-lang/crates.io-index" 2109 + checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" 2110 + dependencies = [ 2111 + "hmac", 2112 + "subtle", 2113 + ] 2114 + 2115 + [[package]] 2116 + name = "rsa" 2117 + version = "0.9.8" 2118 + source = "registry+https://github.com/rust-lang/crates.io-index" 2119 + checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" 2120 + dependencies = [ 2121 + "const-oid", 2122 + "digest", 2123 + "num-bigint-dig", 2124 + "num-integer", 2125 + "num-traits", 2126 + "pkcs1", 2127 + "pkcs8", 2128 + "rand_core", 2129 + "signature", 2130 + "spki", 2131 + "subtle", 2132 + "zeroize", 2133 + ] 2134 + 2135 + [[package]] 418 2136 name = "rustc-demangle" 419 2137 version = "0.1.25" 420 2138 source = "registry+https://github.com/rust-lang/crates.io-index" 421 2139 checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" 422 2140 423 2141 [[package]] 2142 + name = "rustc_version" 2143 + version = "0.4.1" 2144 + source = "registry+https://github.com/rust-lang/crates.io-index" 2145 + checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 2146 + dependencies = [ 2147 + "semver", 2148 + ] 2149 + 2150 + [[package]] 2151 + name = "rustix" 2152 + version = "1.0.8" 2153 + source = "registry+https://github.com/rust-lang/crates.io-index" 2154 + checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" 2155 + dependencies = [ 2156 + "bitflags", 2157 + "errno", 2158 + "libc", 2159 + "linux-raw-sys", 2160 + "windows-sys 0.59.0", 2161 + ] 2162 + 2163 + [[package]] 2164 + name = "rustls-pki-types" 2165 + version = "1.12.0" 2166 + source = "registry+https://github.com/rust-lang/crates.io-index" 2167 + checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" 2168 + dependencies = [ 2169 + "zeroize", 2170 + ] 2171 + 2172 + [[package]] 424 2173 name = "rustversion" 425 2174 version = "1.0.21" 426 2175 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 433 2182 checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 434 2183 435 2184 [[package]] 2185 + name = "schannel" 2186 + version = "0.1.27" 2187 + source = "registry+https://github.com/rust-lang/crates.io-index" 2188 + checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 2189 + dependencies = [ 2190 + "windows-sys 0.59.0", 2191 + ] 2192 + 2193 + [[package]] 2194 + name = "scoped-tls" 2195 + version = "1.0.1" 2196 + source = "registry+https://github.com/rust-lang/crates.io-index" 2197 + checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 2198 + 2199 + [[package]] 436 2200 name = "scopeguard" 437 2201 version = "1.2.0" 438 2202 source = "registry+https://github.com/rust-lang/crates.io-index" 439 2203 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 440 2204 441 2205 [[package]] 2206 + name = "sec1" 2207 + version = "0.7.3" 2208 + source = "registry+https://github.com/rust-lang/crates.io-index" 2209 + checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" 2210 + dependencies = [ 2211 + "base16ct", 2212 + "der", 2213 + "generic-array", 2214 + "subtle", 2215 + "zeroize", 2216 + ] 2217 + 2218 + [[package]] 2219 + name = "security-framework" 2220 + version = "2.11.1" 2221 + source = "registry+https://github.com/rust-lang/crates.io-index" 2222 + checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 2223 + dependencies = [ 2224 + "bitflags", 2225 + "core-foundation", 2226 + "core-foundation-sys", 2227 + "libc", 2228 + "security-framework-sys", 2229 + ] 2230 + 2231 + [[package]] 2232 + name = "security-framework-sys" 2233 + version = "2.14.0" 2234 + source = "registry+https://github.com/rust-lang/crates.io-index" 2235 + checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" 2236 + dependencies = [ 2237 + "core-foundation-sys", 2238 + "libc", 2239 + ] 2240 + 2241 + [[package]] 2242 + name = "semver" 2243 + version = "1.0.26" 2244 + source = "registry+https://github.com/rust-lang/crates.io-index" 2245 + checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" 2246 + 2247 + [[package]] 442 2248 name = "serde" 443 2249 version = "1.0.219" 444 2250 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 448 2254 ] 449 2255 450 2256 [[package]] 2257 + name = "serde_bytes" 2258 + version = "0.11.17" 2259 + source = "registry+https://github.com/rust-lang/crates.io-index" 2260 + checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" 2261 + dependencies = [ 2262 + "serde", 2263 + ] 2264 + 2265 + [[package]] 451 2266 name = "serde_derive" 452 2267 version = "1.0.219" 453 2268 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 456 2271 "proc-macro2", 457 2272 "quote", 458 2273 "syn", 2274 + ] 2275 + 2276 + [[package]] 2277 + name = "serde_html_form" 2278 + version = "0.2.7" 2279 + source = "registry+https://github.com/rust-lang/crates.io-index" 2280 + checksum = "9d2de91cf02bbc07cde38891769ccd5d4f073d22a40683aa4bc7a95781aaa2c4" 2281 + dependencies = [ 2282 + "form_urlencoded", 2283 + "indexmap", 2284 + "itoa", 2285 + "ryu", 2286 + "serde", 459 2287 ] 460 2288 461 2289 [[package]] ··· 493 2321 ] 494 2322 495 2323 [[package]] 2324 + name = "sha1" 2325 + version = "0.10.6" 2326 + source = "registry+https://github.com/rust-lang/crates.io-index" 2327 + checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 2328 + dependencies = [ 2329 + "cfg-if", 2330 + "cpufeatures", 2331 + "digest", 2332 + ] 2333 + 2334 + [[package]] 2335 + name = "sha1_smol" 2336 + version = "1.0.1" 2337 + source = "registry+https://github.com/rust-lang/crates.io-index" 2338 + checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" 2339 + 2340 + [[package]] 2341 + name = "sha2" 2342 + version = "0.10.9" 2343 + source = "registry+https://github.com/rust-lang/crates.io-index" 2344 + checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" 2345 + dependencies = [ 2346 + "cfg-if", 2347 + "cpufeatures", 2348 + "digest", 2349 + ] 2350 + 2351 + [[package]] 2352 + name = "sharded-slab" 2353 + version = "0.1.7" 2354 + source = "registry+https://github.com/rust-lang/crates.io-index" 2355 + checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 2356 + dependencies = [ 2357 + "lazy_static", 2358 + ] 2359 + 2360 + [[package]] 2361 + name = "shared" 2362 + version = "0.1.0" 2363 + dependencies = [ 2364 + "atrium-api", 2365 + "atrium-common", 2366 + "atrium-identity", 2367 + "atrium-oauth", 2368 + "axum", 2369 + "bb8", 2370 + "bb8-redis", 2371 + "hickory-resolver", 2372 + "log", 2373 + "serde", 2374 + "serde_json", 2375 + "sqlx", 2376 + "thiserror 1.0.69", 2377 + ] 2378 + 2379 + [[package]] 2380 + name = "shlex" 2381 + version = "1.3.0" 2382 + source = "registry+https://github.com/rust-lang/crates.io-index" 2383 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 2384 + 2385 + [[package]] 496 2386 name = "signal-hook-registry" 497 2387 version = "1.4.5" 498 2388 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 502 2392 ] 503 2393 504 2394 [[package]] 2395 + name = "signature" 2396 + version = "2.2.0" 2397 + source = "registry+https://github.com/rust-lang/crates.io-index" 2398 + checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 2399 + dependencies = [ 2400 + "digest", 2401 + "rand_core", 2402 + ] 2403 + 2404 + [[package]] 505 2405 name = "slab" 506 2406 version = "0.4.10" 507 2407 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 512 2412 version = "1.15.1" 513 2413 source = "registry+https://github.com/rust-lang/crates.io-index" 514 2414 checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 2415 + dependencies = [ 2416 + "serde", 2417 + ] 515 2418 516 2419 [[package]] 517 2420 name = "socket2" ··· 524 2427 ] 525 2428 526 2429 [[package]] 2430 + name = "socket2" 2431 + version = "0.6.0" 2432 + source = "registry+https://github.com/rust-lang/crates.io-index" 2433 + checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" 2434 + dependencies = [ 2435 + "libc", 2436 + "windows-sys 0.59.0", 2437 + ] 2438 + 2439 + [[package]] 2440 + name = "spin" 2441 + version = "0.9.8" 2442 + source = "registry+https://github.com/rust-lang/crates.io-index" 2443 + checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2444 + dependencies = [ 2445 + "lock_api", 2446 + ] 2447 + 2448 + [[package]] 2449 + name = "spki" 2450 + version = "0.7.3" 2451 + source = "registry+https://github.com/rust-lang/crates.io-index" 2452 + checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 2453 + dependencies = [ 2454 + "base64ct", 2455 + "der", 2456 + ] 2457 + 2458 + [[package]] 2459 + name = "sqlx" 2460 + version = "0.8.6" 2461 + source = "registry+https://github.com/rust-lang/crates.io-index" 2462 + checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" 2463 + dependencies = [ 2464 + "sqlx-core", 2465 + "sqlx-macros", 2466 + "sqlx-mysql", 2467 + "sqlx-postgres", 2468 + "sqlx-sqlite", 2469 + ] 2470 + 2471 + [[package]] 2472 + name = "sqlx-core" 2473 + version = "0.8.6" 2474 + source = "registry+https://github.com/rust-lang/crates.io-index" 2475 + checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" 2476 + dependencies = [ 2477 + "base64", 2478 + "bytes", 2479 + "chrono", 2480 + "crc", 2481 + "crossbeam-queue", 2482 + "either", 2483 + "event-listener", 2484 + "futures-core", 2485 + "futures-intrusive", 2486 + "futures-io", 2487 + "futures-util", 2488 + "hashbrown 0.15.4", 2489 + "hashlink", 2490 + "indexmap", 2491 + "log", 2492 + "memchr", 2493 + "once_cell", 2494 + "percent-encoding", 2495 + "serde", 2496 + "serde_json", 2497 + "sha2", 2498 + "smallvec", 2499 + "thiserror 2.0.12", 2500 + "tokio", 2501 + "tokio-stream", 2502 + "tracing", 2503 + "url", 2504 + ] 2505 + 2506 + [[package]] 2507 + name = "sqlx-macros" 2508 + version = "0.8.6" 2509 + source = "registry+https://github.com/rust-lang/crates.io-index" 2510 + checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" 2511 + dependencies = [ 2512 + "proc-macro2", 2513 + "quote", 2514 + "sqlx-core", 2515 + "sqlx-macros-core", 2516 + "syn", 2517 + ] 2518 + 2519 + [[package]] 2520 + name = "sqlx-macros-core" 2521 + version = "0.8.6" 2522 + source = "registry+https://github.com/rust-lang/crates.io-index" 2523 + checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" 2524 + dependencies = [ 2525 + "dotenvy", 2526 + "either", 2527 + "heck", 2528 + "hex", 2529 + "once_cell", 2530 + "proc-macro2", 2531 + "quote", 2532 + "serde", 2533 + "serde_json", 2534 + "sha2", 2535 + "sqlx-core", 2536 + "sqlx-mysql", 2537 + "sqlx-postgres", 2538 + "sqlx-sqlite", 2539 + "syn", 2540 + "tokio", 2541 + "url", 2542 + ] 2543 + 2544 + [[package]] 2545 + name = "sqlx-mysql" 2546 + version = "0.8.6" 2547 + source = "registry+https://github.com/rust-lang/crates.io-index" 2548 + checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" 2549 + dependencies = [ 2550 + "atoi", 2551 + "base64", 2552 + "bitflags", 2553 + "byteorder", 2554 + "bytes", 2555 + "chrono", 2556 + "crc", 2557 + "digest", 2558 + "dotenvy", 2559 + "either", 2560 + "futures-channel", 2561 + "futures-core", 2562 + "futures-io", 2563 + "futures-util", 2564 + "generic-array", 2565 + "hex", 2566 + "hkdf", 2567 + "hmac", 2568 + "itoa", 2569 + "log", 2570 + "md-5", 2571 + "memchr", 2572 + "once_cell", 2573 + "percent-encoding", 2574 + "rand", 2575 + "rsa", 2576 + "serde", 2577 + "sha1", 2578 + "sha2", 2579 + "smallvec", 2580 + "sqlx-core", 2581 + "stringprep", 2582 + "thiserror 2.0.12", 2583 + "tracing", 2584 + "whoami", 2585 + ] 2586 + 2587 + [[package]] 2588 + name = "sqlx-postgres" 2589 + version = "0.8.6" 2590 + source = "registry+https://github.com/rust-lang/crates.io-index" 2591 + checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" 2592 + dependencies = [ 2593 + "atoi", 2594 + "base64", 2595 + "bitflags", 2596 + "byteorder", 2597 + "chrono", 2598 + "crc", 2599 + "dotenvy", 2600 + "etcetera", 2601 + "futures-channel", 2602 + "futures-core", 2603 + "futures-util", 2604 + "hex", 2605 + "hkdf", 2606 + "hmac", 2607 + "home", 2608 + "itoa", 2609 + "log", 2610 + "md-5", 2611 + "memchr", 2612 + "once_cell", 2613 + "rand", 2614 + "serde", 2615 + "serde_json", 2616 + "sha2", 2617 + "smallvec", 2618 + "sqlx-core", 2619 + "stringprep", 2620 + "thiserror 2.0.12", 2621 + "tracing", 2622 + "whoami", 2623 + ] 2624 + 2625 + [[package]] 2626 + name = "sqlx-sqlite" 2627 + version = "0.8.6" 2628 + source = "registry+https://github.com/rust-lang/crates.io-index" 2629 + checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" 2630 + dependencies = [ 2631 + "atoi", 2632 + "chrono", 2633 + "flume", 2634 + "futures-channel", 2635 + "futures-core", 2636 + "futures-executor", 2637 + "futures-intrusive", 2638 + "futures-util", 2639 + "libsqlite3-sys", 2640 + "log", 2641 + "percent-encoding", 2642 + "serde", 2643 + "serde_urlencoded", 2644 + "sqlx-core", 2645 + "thiserror 2.0.12", 2646 + "tracing", 2647 + "url", 2648 + ] 2649 + 2650 + [[package]] 2651 + name = "stable_deref_trait" 2652 + version = "1.2.0" 2653 + source = "registry+https://github.com/rust-lang/crates.io-index" 2654 + checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 2655 + 2656 + [[package]] 2657 + name = "stringprep" 2658 + version = "0.1.5" 2659 + source = "registry+https://github.com/rust-lang/crates.io-index" 2660 + checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" 2661 + dependencies = [ 2662 + "unicode-bidi", 2663 + "unicode-normalization", 2664 + "unicode-properties", 2665 + ] 2666 + 2667 + [[package]] 2668 + name = "subtle" 2669 + version = "2.6.1" 2670 + source = "registry+https://github.com/rust-lang/crates.io-index" 2671 + checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 2672 + 2673 + [[package]] 527 2674 name = "syn" 528 2675 version = "2.0.104" 529 2676 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 539 2686 version = "1.0.2" 540 2687 source = "registry+https://github.com/rust-lang/crates.io-index" 541 2688 checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 2689 + dependencies = [ 2690 + "futures-core", 2691 + ] 2692 + 2693 + [[package]] 2694 + name = "synstructure" 2695 + version = "0.13.2" 2696 + source = "registry+https://github.com/rust-lang/crates.io-index" 2697 + checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" 2698 + dependencies = [ 2699 + "proc-macro2", 2700 + "quote", 2701 + "syn", 2702 + ] 2703 + 2704 + [[package]] 2705 + name = "tagptr" 2706 + version = "0.2.0" 2707 + source = "registry+https://github.com/rust-lang/crates.io-index" 2708 + checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" 2709 + 2710 + [[package]] 2711 + name = "tempfile" 2712 + version = "3.20.0" 2713 + source = "registry+https://github.com/rust-lang/crates.io-index" 2714 + checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" 2715 + dependencies = [ 2716 + "fastrand", 2717 + "getrandom 0.3.3", 2718 + "once_cell", 2719 + "rustix", 2720 + "windows-sys 0.59.0", 2721 + ] 2722 + 2723 + [[package]] 2724 + name = "thiserror" 2725 + version = "1.0.69" 2726 + source = "registry+https://github.com/rust-lang/crates.io-index" 2727 + checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 2728 + dependencies = [ 2729 + "thiserror-impl 1.0.69", 2730 + ] 2731 + 2732 + [[package]] 2733 + name = "thiserror" 2734 + version = "2.0.12" 2735 + source = "registry+https://github.com/rust-lang/crates.io-index" 2736 + checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 2737 + dependencies = [ 2738 + "thiserror-impl 2.0.12", 2739 + ] 2740 + 2741 + [[package]] 2742 + name = "thiserror-impl" 2743 + version = "1.0.69" 2744 + source = "registry+https://github.com/rust-lang/crates.io-index" 2745 + checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 2746 + dependencies = [ 2747 + "proc-macro2", 2748 + "quote", 2749 + "syn", 2750 + ] 2751 + 2752 + [[package]] 2753 + name = "thiserror-impl" 2754 + version = "2.0.12" 2755 + source = "registry+https://github.com/rust-lang/crates.io-index" 2756 + checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 2757 + dependencies = [ 2758 + "proc-macro2", 2759 + "quote", 2760 + "syn", 2761 + ] 2762 + 2763 + [[package]] 2764 + name = "thread_local" 2765 + version = "1.1.9" 2766 + source = "registry+https://github.com/rust-lang/crates.io-index" 2767 + checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 2768 + dependencies = [ 2769 + "cfg-if", 2770 + ] 2771 + 2772 + [[package]] 2773 + name = "time" 2774 + version = "0.3.41" 2775 + source = "registry+https://github.com/rust-lang/crates.io-index" 2776 + checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" 2777 + dependencies = [ 2778 + "deranged", 2779 + "itoa", 2780 + "num-conv", 2781 + "powerfmt", 2782 + "serde", 2783 + "time-core", 2784 + "time-macros", 2785 + ] 2786 + 2787 + [[package]] 2788 + name = "time-core" 2789 + version = "0.1.4" 2790 + source = "registry+https://github.com/rust-lang/crates.io-index" 2791 + checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" 2792 + 2793 + [[package]] 2794 + name = "time-macros" 2795 + version = "0.2.22" 2796 + source = "registry+https://github.com/rust-lang/crates.io-index" 2797 + checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" 2798 + dependencies = [ 2799 + "num-conv", 2800 + "time-core", 2801 + ] 2802 + 2803 + [[package]] 2804 + name = "tinystr" 2805 + version = "0.8.1" 2806 + source = "registry+https://github.com/rust-lang/crates.io-index" 2807 + checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" 2808 + dependencies = [ 2809 + "displaydoc", 2810 + "zerovec", 2811 + ] 2812 + 2813 + [[package]] 2814 + name = "tinyvec" 2815 + version = "1.9.0" 2816 + source = "registry+https://github.com/rust-lang/crates.io-index" 2817 + checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" 2818 + dependencies = [ 2819 + "tinyvec_macros", 2820 + ] 2821 + 2822 + [[package]] 2823 + name = "tinyvec_macros" 2824 + version = "0.1.1" 2825 + source = "registry+https://github.com/rust-lang/crates.io-index" 2826 + checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 542 2827 543 2828 [[package]] 544 2829 name = "tokio" 545 - version = "1.46.1" 2830 + version = "1.47.0" 546 2831 source = "registry+https://github.com/rust-lang/crates.io-index" 547 - checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" 2832 + checksum = "43864ed400b6043a4757a25c7a64a8efde741aed79a056a2fb348a406701bb35" 548 2833 dependencies = [ 549 2834 "backtrace", 550 2835 "bytes", ··· 555 2840 "pin-project-lite", 556 2841 "signal-hook-registry", 557 2842 "slab", 558 - "socket2", 2843 + "socket2 0.6.0", 559 2844 "tokio-macros", 560 - "windows-sys 0.52.0", 2845 + "windows-sys 0.59.0", 561 2846 ] 562 2847 563 2848 [[package]] ··· 572 2857 ] 573 2858 574 2859 [[package]] 2860 + name = "tokio-native-tls" 2861 + version = "0.3.1" 2862 + source = "registry+https://github.com/rust-lang/crates.io-index" 2863 + checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 2864 + dependencies = [ 2865 + "native-tls", 2866 + "tokio", 2867 + ] 2868 + 2869 + [[package]] 2870 + name = "tokio-stream" 2871 + version = "0.1.17" 2872 + source = "registry+https://github.com/rust-lang/crates.io-index" 2873 + checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" 2874 + dependencies = [ 2875 + "futures-core", 2876 + "pin-project-lite", 2877 + "tokio", 2878 + ] 2879 + 2880 + [[package]] 2881 + name = "tokio-util" 2882 + version = "0.7.15" 2883 + source = "registry+https://github.com/rust-lang/crates.io-index" 2884 + checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" 2885 + dependencies = [ 2886 + "bytes", 2887 + "futures-core", 2888 + "futures-sink", 2889 + "pin-project-lite", 2890 + "tokio", 2891 + ] 2892 + 2893 + [[package]] 575 2894 name = "tower" 576 2895 version = "0.5.2" 577 2896 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 588 2907 ] 589 2908 590 2909 [[package]] 2910 + name = "tower-cookies" 2911 + version = "0.11.0" 2912 + source = "registry+https://github.com/rust-lang/crates.io-index" 2913 + checksum = "151b5a3e3c45df17466454bb74e9ecedecc955269bdedbf4d150dfa393b55a36" 2914 + dependencies = [ 2915 + "axum-core", 2916 + "cookie", 2917 + "futures-util", 2918 + "http", 2919 + "parking_lot", 2920 + "pin-project-lite", 2921 + "tower-layer", 2922 + "tower-service", 2923 + ] 2924 + 2925 + [[package]] 2926 + name = "tower-http" 2927 + version = "0.6.6" 2928 + source = "registry+https://github.com/rust-lang/crates.io-index" 2929 + checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" 2930 + dependencies = [ 2931 + "bitflags", 2932 + "bytes", 2933 + "futures-util", 2934 + "http", 2935 + "http-body", 2936 + "iri-string", 2937 + "pin-project-lite", 2938 + "tower", 2939 + "tower-layer", 2940 + "tower-service", 2941 + "tracing", 2942 + ] 2943 + 2944 + [[package]] 591 2945 name = "tower-layer" 592 2946 version = "0.3.3" 593 2947 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 600 2954 checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 601 2955 602 2956 [[package]] 2957 + name = "tower-sessions" 2958 + version = "0.14.0" 2959 + source = "registry+https://github.com/rust-lang/crates.io-index" 2960 + checksum = "43a05911f23e8fae446005fe9b7b97e66d95b6db589dc1c4d59f6a2d4d4927d3" 2961 + dependencies = [ 2962 + "async-trait", 2963 + "http", 2964 + "time", 2965 + "tokio", 2966 + "tower-cookies", 2967 + "tower-layer", 2968 + "tower-service", 2969 + "tower-sessions-core", 2970 + "tower-sessions-memory-store", 2971 + "tracing", 2972 + ] 2973 + 2974 + [[package]] 2975 + name = "tower-sessions-core" 2976 + version = "0.14.0" 2977 + source = "registry+https://github.com/rust-lang/crates.io-index" 2978 + checksum = "ce8cce604865576b7751b7a6bc3058f754569a60d689328bb74c52b1d87e355b" 2979 + dependencies = [ 2980 + "async-trait", 2981 + "axum-core", 2982 + "base64", 2983 + "futures", 2984 + "http", 2985 + "parking_lot", 2986 + "rand", 2987 + "serde", 2988 + "serde_json", 2989 + "thiserror 2.0.12", 2990 + "time", 2991 + "tokio", 2992 + "tracing", 2993 + ] 2994 + 2995 + [[package]] 2996 + name = "tower-sessions-memory-store" 2997 + version = "0.14.0" 2998 + source = "registry+https://github.com/rust-lang/crates.io-index" 2999 + checksum = "fb05909f2e1420135a831dd5df9f5596d69196d0a64c3499ca474c4bd3d33242" 3000 + dependencies = [ 3001 + "async-trait", 3002 + "time", 3003 + "tokio", 3004 + "tower-sessions-core", 3005 + ] 3006 + 3007 + [[package]] 603 3008 name = "tracing" 604 3009 version = "0.1.41" 605 3010 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 607 3012 dependencies = [ 608 3013 "log", 609 3014 "pin-project-lite", 3015 + "tracing-attributes", 610 3016 "tracing-core", 611 3017 ] 612 3018 613 3019 [[package]] 3020 + name = "tracing-attributes" 3021 + version = "0.1.28" 3022 + source = "registry+https://github.com/rust-lang/crates.io-index" 3023 + checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 3024 + dependencies = [ 3025 + "proc-macro2", 3026 + "quote", 3027 + "syn", 3028 + ] 3029 + 3030 + [[package]] 614 3031 name = "tracing-core" 615 3032 version = "0.1.34" 616 3033 source = "registry+https://github.com/rust-lang/crates.io-index" 617 3034 checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" 618 3035 dependencies = [ 619 3036 "once_cell", 3037 + "valuable", 620 3038 ] 621 3039 622 3040 [[package]] 3041 + name = "tracing-log" 3042 + version = "0.2.0" 3043 + source = "registry+https://github.com/rust-lang/crates.io-index" 3044 + checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 3045 + dependencies = [ 3046 + "log", 3047 + "once_cell", 3048 + "tracing-core", 3049 + ] 3050 + 3051 + [[package]] 3052 + name = "tracing-subscriber" 3053 + version = "0.3.19" 3054 + source = "registry+https://github.com/rust-lang/crates.io-index" 3055 + checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" 3056 + dependencies = [ 3057 + "matchers", 3058 + "nu-ansi-term", 3059 + "once_cell", 3060 + "regex", 3061 + "sharded-slab", 3062 + "smallvec", 3063 + "thread_local", 3064 + "tracing", 3065 + "tracing-core", 3066 + "tracing-log", 3067 + ] 3068 + 3069 + [[package]] 3070 + name = "trait-variant" 3071 + version = "0.1.2" 3072 + source = "registry+https://github.com/rust-lang/crates.io-index" 3073 + checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" 3074 + dependencies = [ 3075 + "proc-macro2", 3076 + "quote", 3077 + "syn", 3078 + ] 3079 + 3080 + [[package]] 3081 + name = "try-lock" 3082 + version = "0.2.5" 3083 + source = "registry+https://github.com/rust-lang/crates.io-index" 3084 + checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 3085 + 3086 + [[package]] 3087 + name = "typenum" 3088 + version = "1.18.0" 3089 + source = "registry+https://github.com/rust-lang/crates.io-index" 3090 + checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" 3091 + 3092 + [[package]] 3093 + name = "unicode-bidi" 3094 + version = "0.3.18" 3095 + source = "registry+https://github.com/rust-lang/crates.io-index" 3096 + checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" 3097 + 3098 + [[package]] 623 3099 name = "unicode-ident" 624 3100 version = "1.0.18" 625 3101 source = "registry+https://github.com/rust-lang/crates.io-index" 626 3102 checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 627 3103 628 3104 [[package]] 3105 + name = "unicode-normalization" 3106 + version = "0.1.24" 3107 + source = "registry+https://github.com/rust-lang/crates.io-index" 3108 + checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" 3109 + dependencies = [ 3110 + "tinyvec", 3111 + ] 3112 + 3113 + [[package]] 3114 + name = "unicode-properties" 3115 + version = "0.1.3" 3116 + source = "registry+https://github.com/rust-lang/crates.io-index" 3117 + checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" 3118 + 3119 + [[package]] 3120 + name = "unsigned-varint" 3121 + version = "0.8.0" 3122 + source = "registry+https://github.com/rust-lang/crates.io-index" 3123 + checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" 3124 + 3125 + [[package]] 3126 + name = "url" 3127 + version = "2.5.4" 3128 + source = "registry+https://github.com/rust-lang/crates.io-index" 3129 + checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" 3130 + dependencies = [ 3131 + "form_urlencoded", 3132 + "idna", 3133 + "percent-encoding", 3134 + ] 3135 + 3136 + [[package]] 3137 + name = "utf8_iter" 3138 + version = "1.0.4" 3139 + source = "registry+https://github.com/rust-lang/crates.io-index" 3140 + checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 3141 + 3142 + [[package]] 3143 + name = "uuid" 3144 + version = "1.17.0" 3145 + source = "registry+https://github.com/rust-lang/crates.io-index" 3146 + checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" 3147 + dependencies = [ 3148 + "getrandom 0.3.3", 3149 + "js-sys", 3150 + "wasm-bindgen", 3151 + ] 3152 + 3153 + [[package]] 3154 + name = "valuable" 3155 + version = "0.1.1" 3156 + source = "registry+https://github.com/rust-lang/crates.io-index" 3157 + checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 3158 + 3159 + [[package]] 3160 + name = "vcpkg" 3161 + version = "0.2.15" 3162 + source = "registry+https://github.com/rust-lang/crates.io-index" 3163 + checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 3164 + 3165 + [[package]] 3166 + name = "version_check" 3167 + version = "0.9.5" 3168 + source = "registry+https://github.com/rust-lang/crates.io-index" 3169 + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 3170 + 3171 + [[package]] 3172 + name = "want" 3173 + version = "0.3.1" 3174 + source = "registry+https://github.com/rust-lang/crates.io-index" 3175 + checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 3176 + dependencies = [ 3177 + "try-lock", 3178 + ] 3179 + 3180 + [[package]] 629 3181 name = "wasi" 630 3182 version = "0.11.1+wasi-snapshot-preview1" 631 3183 source = "registry+https://github.com/rust-lang/crates.io-index" 632 3184 checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 633 3185 634 3186 [[package]] 3187 + name = "wasi" 3188 + version = "0.14.2+wasi-0.2.4" 3189 + source = "registry+https://github.com/rust-lang/crates.io-index" 3190 + checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" 3191 + dependencies = [ 3192 + "wit-bindgen-rt", 3193 + ] 3194 + 3195 + [[package]] 3196 + name = "wasite" 3197 + version = "0.1.0" 3198 + source = "registry+https://github.com/rust-lang/crates.io-index" 3199 + checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" 3200 + 3201 + [[package]] 3202 + name = "wasm-bindgen" 3203 + version = "0.2.100" 3204 + source = "registry+https://github.com/rust-lang/crates.io-index" 3205 + checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 3206 + dependencies = [ 3207 + "cfg-if", 3208 + "once_cell", 3209 + "rustversion", 3210 + "wasm-bindgen-macro", 3211 + ] 3212 + 3213 + [[package]] 3214 + name = "wasm-bindgen-backend" 3215 + version = "0.2.100" 3216 + source = "registry+https://github.com/rust-lang/crates.io-index" 3217 + checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 3218 + dependencies = [ 3219 + "bumpalo", 3220 + "log", 3221 + "proc-macro2", 3222 + "quote", 3223 + "syn", 3224 + "wasm-bindgen-shared", 3225 + ] 3226 + 3227 + [[package]] 3228 + name = "wasm-bindgen-futures" 3229 + version = "0.4.50" 3230 + source = "registry+https://github.com/rust-lang/crates.io-index" 3231 + checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 3232 + dependencies = [ 3233 + "cfg-if", 3234 + "js-sys", 3235 + "once_cell", 3236 + "wasm-bindgen", 3237 + "web-sys", 3238 + ] 3239 + 3240 + [[package]] 3241 + name = "wasm-bindgen-macro" 3242 + version = "0.2.100" 3243 + source = "registry+https://github.com/rust-lang/crates.io-index" 3244 + checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 3245 + dependencies = [ 3246 + "quote", 3247 + "wasm-bindgen-macro-support", 3248 + ] 3249 + 3250 + [[package]] 3251 + name = "wasm-bindgen-macro-support" 3252 + version = "0.2.100" 3253 + source = "registry+https://github.com/rust-lang/crates.io-index" 3254 + checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 3255 + dependencies = [ 3256 + "proc-macro2", 3257 + "quote", 3258 + "syn", 3259 + "wasm-bindgen-backend", 3260 + "wasm-bindgen-shared", 3261 + ] 3262 + 3263 + [[package]] 3264 + name = "wasm-bindgen-shared" 3265 + version = "0.2.100" 3266 + source = "registry+https://github.com/rust-lang/crates.io-index" 3267 + checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 3268 + dependencies = [ 3269 + "unicode-ident", 3270 + ] 3271 + 3272 + [[package]] 3273 + name = "web" 3274 + version = "0.1.0" 3275 + dependencies = [ 3276 + "atrium-api", 3277 + "atrium-common", 3278 + "atrium-identity", 3279 + "atrium-oauth", 3280 + "axum", 3281 + "bb8", 3282 + "bb8-redis", 3283 + "dotenv", 3284 + "log", 3285 + "redis", 3286 + "serde", 3287 + "serde_json", 3288 + "shared", 3289 + "sqlx", 3290 + "tokio", 3291 + "tower-http", 3292 + "tower-sessions", 3293 + "tracing", 3294 + "tracing-subscriber", 3295 + ] 3296 + 3297 + [[package]] 3298 + name = "web-sys" 3299 + version = "0.3.77" 3300 + source = "registry+https://github.com/rust-lang/crates.io-index" 3301 + checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 3302 + dependencies = [ 3303 + "js-sys", 3304 + "wasm-bindgen", 3305 + ] 3306 + 3307 + [[package]] 3308 + name = "web-time" 3309 + version = "1.1.0" 3310 + source = "registry+https://github.com/rust-lang/crates.io-index" 3311 + checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 3312 + dependencies = [ 3313 + "js-sys", 3314 + "wasm-bindgen", 3315 + ] 3316 + 3317 + [[package]] 3318 + name = "whoami" 3319 + version = "1.6.0" 3320 + source = "registry+https://github.com/rust-lang/crates.io-index" 3321 + checksum = "6994d13118ab492c3c80c1f81928718159254c53c472bf9ce36f8dae4add02a7" 3322 + dependencies = [ 3323 + "redox_syscall", 3324 + "wasite", 3325 + ] 3326 + 3327 + [[package]] 3328 + name = "widestring" 3329 + version = "1.2.0" 3330 + source = "registry+https://github.com/rust-lang/crates.io-index" 3331 + checksum = "dd7cf3379ca1aac9eea11fba24fd7e315d621f8dfe35c8d7d2be8b793726e07d" 3332 + 3333 + [[package]] 3334 + name = "winapi" 3335 + version = "0.3.9" 3336 + source = "registry+https://github.com/rust-lang/crates.io-index" 3337 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3338 + dependencies = [ 3339 + "winapi-i686-pc-windows-gnu", 3340 + "winapi-x86_64-pc-windows-gnu", 3341 + ] 3342 + 3343 + [[package]] 3344 + name = "winapi-i686-pc-windows-gnu" 3345 + version = "0.4.0" 3346 + source = "registry+https://github.com/rust-lang/crates.io-index" 3347 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3348 + 3349 + [[package]] 3350 + name = "winapi-x86_64-pc-windows-gnu" 3351 + version = "0.4.0" 3352 + source = "registry+https://github.com/rust-lang/crates.io-index" 3353 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3354 + 3355 + [[package]] 3356 + name = "windows" 3357 + version = "0.61.3" 3358 + source = "registry+https://github.com/rust-lang/crates.io-index" 3359 + checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" 3360 + dependencies = [ 3361 + "windows-collections", 3362 + "windows-core", 3363 + "windows-future", 3364 + "windows-link", 3365 + "windows-numerics", 3366 + ] 3367 + 3368 + [[package]] 3369 + name = "windows-collections" 3370 + version = "0.2.0" 3371 + source = "registry+https://github.com/rust-lang/crates.io-index" 3372 + checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" 3373 + dependencies = [ 3374 + "windows-core", 3375 + ] 3376 + 3377 + [[package]] 3378 + name = "windows-core" 3379 + version = "0.61.2" 3380 + source = "registry+https://github.com/rust-lang/crates.io-index" 3381 + checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" 3382 + dependencies = [ 3383 + "windows-implement", 3384 + "windows-interface", 3385 + "windows-link", 3386 + "windows-result", 3387 + "windows-strings", 3388 + ] 3389 + 3390 + [[package]] 3391 + name = "windows-future" 3392 + version = "0.2.1" 3393 + source = "registry+https://github.com/rust-lang/crates.io-index" 3394 + checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" 3395 + dependencies = [ 3396 + "windows-core", 3397 + "windows-link", 3398 + "windows-threading", 3399 + ] 3400 + 3401 + [[package]] 3402 + name = "windows-implement" 3403 + version = "0.60.0" 3404 + source = "registry+https://github.com/rust-lang/crates.io-index" 3405 + checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" 3406 + dependencies = [ 3407 + "proc-macro2", 3408 + "quote", 3409 + "syn", 3410 + ] 3411 + 3412 + [[package]] 3413 + name = "windows-interface" 3414 + version = "0.59.1" 3415 + source = "registry+https://github.com/rust-lang/crates.io-index" 3416 + checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" 3417 + dependencies = [ 3418 + "proc-macro2", 3419 + "quote", 3420 + "syn", 3421 + ] 3422 + 3423 + [[package]] 3424 + name = "windows-link" 3425 + version = "0.1.3" 3426 + source = "registry+https://github.com/rust-lang/crates.io-index" 3427 + checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" 3428 + 3429 + [[package]] 3430 + name = "windows-numerics" 3431 + version = "0.2.0" 3432 + source = "registry+https://github.com/rust-lang/crates.io-index" 3433 + checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" 3434 + dependencies = [ 3435 + "windows-core", 3436 + "windows-link", 3437 + ] 3438 + 3439 + [[package]] 3440 + name = "windows-result" 3441 + version = "0.3.4" 3442 + source = "registry+https://github.com/rust-lang/crates.io-index" 3443 + checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" 3444 + dependencies = [ 3445 + "windows-link", 3446 + ] 3447 + 3448 + [[package]] 3449 + name = "windows-strings" 3450 + version = "0.4.2" 3451 + source = "registry+https://github.com/rust-lang/crates.io-index" 3452 + checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" 3453 + dependencies = [ 3454 + "windows-link", 3455 + ] 3456 + 3457 + [[package]] 3458 + name = "windows-sys" 3459 + version = "0.48.0" 3460 + source = "registry+https://github.com/rust-lang/crates.io-index" 3461 + checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 3462 + dependencies = [ 3463 + "windows-targets 0.48.5", 3464 + ] 3465 + 3466 + [[package]] 635 3467 name = "windows-sys" 636 3468 version = "0.52.0" 637 3469 source = "registry+https://github.com/rust-lang/crates.io-index" 638 3470 checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 639 3471 dependencies = [ 640 - "windows-targets", 3472 + "windows-targets 0.52.6", 641 3473 ] 642 3474 643 3475 [[package]] ··· 646 3478 source = "registry+https://github.com/rust-lang/crates.io-index" 647 3479 checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 648 3480 dependencies = [ 649 - "windows-targets", 3481 + "windows-targets 0.52.6", 3482 + ] 3483 + 3484 + [[package]] 3485 + name = "windows-targets" 3486 + version = "0.48.5" 3487 + source = "registry+https://github.com/rust-lang/crates.io-index" 3488 + checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 3489 + dependencies = [ 3490 + "windows_aarch64_gnullvm 0.48.5", 3491 + "windows_aarch64_msvc 0.48.5", 3492 + "windows_i686_gnu 0.48.5", 3493 + "windows_i686_msvc 0.48.5", 3494 + "windows_x86_64_gnu 0.48.5", 3495 + "windows_x86_64_gnullvm 0.48.5", 3496 + "windows_x86_64_msvc 0.48.5", 650 3497 ] 651 3498 652 3499 [[package]] ··· 655 3502 source = "registry+https://github.com/rust-lang/crates.io-index" 656 3503 checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 657 3504 dependencies = [ 658 - "windows_aarch64_gnullvm", 659 - "windows_aarch64_msvc", 660 - "windows_i686_gnu", 3505 + "windows_aarch64_gnullvm 0.52.6", 3506 + "windows_aarch64_msvc 0.52.6", 3507 + "windows_i686_gnu 0.52.6", 661 3508 "windows_i686_gnullvm", 662 - "windows_i686_msvc", 663 - "windows_x86_64_gnu", 664 - "windows_x86_64_gnullvm", 665 - "windows_x86_64_msvc", 3509 + "windows_i686_msvc 0.52.6", 3510 + "windows_x86_64_gnu 0.52.6", 3511 + "windows_x86_64_gnullvm 0.52.6", 3512 + "windows_x86_64_msvc 0.52.6", 666 3513 ] 3514 + 3515 + [[package]] 3516 + name = "windows-threading" 3517 + version = "0.1.0" 3518 + source = "registry+https://github.com/rust-lang/crates.io-index" 3519 + checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" 3520 + dependencies = [ 3521 + "windows-link", 3522 + ] 3523 + 3524 + [[package]] 3525 + name = "windows_aarch64_gnullvm" 3526 + version = "0.48.5" 3527 + source = "registry+https://github.com/rust-lang/crates.io-index" 3528 + checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 667 3529 668 3530 [[package]] 669 3531 name = "windows_aarch64_gnullvm" ··· 673 3535 674 3536 [[package]] 675 3537 name = "windows_aarch64_msvc" 3538 + version = "0.48.5" 3539 + source = "registry+https://github.com/rust-lang/crates.io-index" 3540 + checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 3541 + 3542 + [[package]] 3543 + name = "windows_aarch64_msvc" 676 3544 version = "0.52.6" 677 3545 source = "registry+https://github.com/rust-lang/crates.io-index" 678 3546 checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 3547 + 3548 + [[package]] 3549 + name = "windows_i686_gnu" 3550 + version = "0.48.5" 3551 + source = "registry+https://github.com/rust-lang/crates.io-index" 3552 + checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 679 3553 680 3554 [[package]] 681 3555 name = "windows_i686_gnu" ··· 691 3565 692 3566 [[package]] 693 3567 name = "windows_i686_msvc" 3568 + version = "0.48.5" 3569 + source = "registry+https://github.com/rust-lang/crates.io-index" 3570 + checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 3571 + 3572 + [[package]] 3573 + name = "windows_i686_msvc" 694 3574 version = "0.52.6" 695 3575 source = "registry+https://github.com/rust-lang/crates.io-index" 696 3576 checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 3577 + 3578 + [[package]] 3579 + name = "windows_x86_64_gnu" 3580 + version = "0.48.5" 3581 + source = "registry+https://github.com/rust-lang/crates.io-index" 3582 + checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 697 3583 698 3584 [[package]] 699 3585 name = "windows_x86_64_gnu" ··· 703 3589 704 3590 [[package]] 705 3591 name = "windows_x86_64_gnullvm" 3592 + version = "0.48.5" 3593 + source = "registry+https://github.com/rust-lang/crates.io-index" 3594 + checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 3595 + 3596 + [[package]] 3597 + name = "windows_x86_64_gnullvm" 706 3598 version = "0.52.6" 707 3599 source = "registry+https://github.com/rust-lang/crates.io-index" 708 3600 checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 3601 + 3602 + [[package]] 3603 + name = "windows_x86_64_msvc" 3604 + version = "0.48.5" 3605 + source = "registry+https://github.com/rust-lang/crates.io-index" 3606 + checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 709 3607 710 3608 [[package]] 711 3609 name = "windows_x86_64_msvc" 712 3610 version = "0.52.6" 713 3611 source = "registry+https://github.com/rust-lang/crates.io-index" 714 3612 checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 3613 + 3614 + [[package]] 3615 + name = "winreg" 3616 + version = "0.50.0" 3617 + source = "registry+https://github.com/rust-lang/crates.io-index" 3618 + checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 3619 + dependencies = [ 3620 + "cfg-if", 3621 + "windows-sys 0.48.0", 3622 + ] 3623 + 3624 + [[package]] 3625 + name = "wit-bindgen-rt" 3626 + version = "0.39.0" 3627 + source = "registry+https://github.com/rust-lang/crates.io-index" 3628 + checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" 3629 + dependencies = [ 3630 + "bitflags", 3631 + ] 3632 + 3633 + [[package]] 3634 + name = "writeable" 3635 + version = "0.6.1" 3636 + source = "registry+https://github.com/rust-lang/crates.io-index" 3637 + checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" 3638 + 3639 + [[package]] 3640 + name = "yoke" 3641 + version = "0.8.0" 3642 + source = "registry+https://github.com/rust-lang/crates.io-index" 3643 + checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" 3644 + dependencies = [ 3645 + "serde", 3646 + "stable_deref_trait", 3647 + "yoke-derive", 3648 + "zerofrom", 3649 + ] 3650 + 3651 + [[package]] 3652 + name = "yoke-derive" 3653 + version = "0.8.0" 3654 + source = "registry+https://github.com/rust-lang/crates.io-index" 3655 + checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" 3656 + dependencies = [ 3657 + "proc-macro2", 3658 + "quote", 3659 + "syn", 3660 + "synstructure", 3661 + ] 3662 + 3663 + [[package]] 3664 + name = "zerocopy" 3665 + version = "0.8.26" 3666 + source = "registry+https://github.com/rust-lang/crates.io-index" 3667 + checksum = "1039dd0d3c310cf05de012d8a39ff557cb0d23087fd44cad61df08fc31907a2f" 3668 + dependencies = [ 3669 + "zerocopy-derive", 3670 + ] 3671 + 3672 + [[package]] 3673 + name = "zerocopy-derive" 3674 + version = "0.8.26" 3675 + source = "registry+https://github.com/rust-lang/crates.io-index" 3676 + checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" 3677 + dependencies = [ 3678 + "proc-macro2", 3679 + "quote", 3680 + "syn", 3681 + ] 3682 + 3683 + [[package]] 3684 + name = "zerofrom" 3685 + version = "0.1.6" 3686 + source = "registry+https://github.com/rust-lang/crates.io-index" 3687 + checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" 3688 + dependencies = [ 3689 + "zerofrom-derive", 3690 + ] 3691 + 3692 + [[package]] 3693 + name = "zerofrom-derive" 3694 + version = "0.1.6" 3695 + source = "registry+https://github.com/rust-lang/crates.io-index" 3696 + checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" 3697 + dependencies = [ 3698 + "proc-macro2", 3699 + "quote", 3700 + "syn", 3701 + "synstructure", 3702 + ] 3703 + 3704 + [[package]] 3705 + name = "zeroize" 3706 + version = "1.8.1" 3707 + source = "registry+https://github.com/rust-lang/crates.io-index" 3708 + checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 3709 + dependencies = [ 3710 + "serde", 3711 + ] 3712 + 3713 + [[package]] 3714 + name = "zerotrie" 3715 + version = "0.2.2" 3716 + source = "registry+https://github.com/rust-lang/crates.io-index" 3717 + checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" 3718 + dependencies = [ 3719 + "displaydoc", 3720 + "yoke", 3721 + "zerofrom", 3722 + ] 3723 + 3724 + [[package]] 3725 + name = "zerovec" 3726 + version = "0.11.2" 3727 + source = "registry+https://github.com/rust-lang/crates.io-index" 3728 + checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" 3729 + dependencies = [ 3730 + "yoke", 3731 + "zerofrom", 3732 + "zerovec-derive", 3733 + ] 3734 + 3735 + [[package]] 3736 + name = "zerovec-derive" 3737 + version = "0.11.1" 3738 + source = "registry+https://github.com/rust-lang/crates.io-index" 3739 + checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" 3740 + dependencies = [ 3741 + "proc-macro2", 3742 + "quote", 3743 + "syn", 3744 + ]
+20 -6
Cargo.toml
··· 1 - [package] 2 - name = "at-advent" 3 - version = "0.1.0" 4 - edition = "2024" 1 + [workspace] 2 + members = ["listener", "shared", "web"] 3 + resolver = "2" 4 + 5 5 6 - [dependencies] 6 + [workspace.dependencies] 7 7 axum = "0.8.4" 8 + atrium-common = "0.1.2" 9 + atrium-api = "0.25.4" 10 + atrium-identity = "0.1.5" 11 + atrium-oauth = "0.1.3" 12 + hickory-resolver = "0.24.1" 13 + dotenv = "0.15.0" 14 + log = "0.4.24" 15 + serde = { version = "1.0.219", features = ["derive"] } 8 16 serde_json = "1.0.141" 9 - tokio = { version = "1.46.1", features = ["full"] } 17 + shared = { path = "./shared" } 18 + sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "chrono", "macros"] } 19 + tracing = "0.1.41" 20 + tracing-subscriber = { version = "0.3.19", features = ["env-filter"] } 21 + bb8 = "0.9.0" 22 + bb8-redis = "0.24.0" 23 + redis = "0.32.4"
+31
README.md
··· 1 + # at://advent 2 + 3 + An upcoming Holiday Advent Calendar for atprotocl theme challenges 4 + 5 + [Read the intinal draft plans here!](docs/initial_plans.md) 6 + 7 + # Quick setup 8 + 9 + WIP 10 + 11 + ## Project break down 12 + 13 + - [./web](./web) - A axum web service to host the advent website 14 + - [./listener](./listener) - A JetStream listener 15 + - [./shared](./shared) - Shared code between the 2, dbs, cache, etc 16 + 17 + ## DB/Cache 18 + 19 + _All commands assume you're at the root of the project_ 20 + 21 + ## Setup 22 + 23 + 1. Make a copy of [.env.template](.env.template) and name it [.env](.env) 24 + 2. Install postgres/redis, or can use docker compose with `docker compose -f compose.dev.yml -up` 25 + 3. Install sqlx-cli `cargo install sqlx-cli` 26 + 4. Run `sqlx migrate run` 27 + 28 + ## Adding a new migration 29 + 30 + 1. Create a new one with `sqlx migrate add {migration name}` 31 + 2. Go to the file created in [./migrations](./migrations) and write the sql for the migration
+34
compose.dev.yml
··· 1 + services: 2 + postgres: 3 + image: postgres:latest 4 + environment: 5 + POSTGRES_USER: ${DB_USER} 6 + POSTGRES_PASSWORD: ${DB_PASSWORD} 7 + POSTGRES_DB: ${DB_NAME} 8 + ports: 9 + - "5432:5432" 10 + volumes: 11 + - advent-postgres-data:/var/lib/postgresql/data 12 + extra_hosts: 13 + - "host.docker.internal:host-gateway" 14 + networks: 15 + - advent-network 16 + redis: 17 + image: 'redis:alpine' 18 + restart: always 19 + ports: 20 + - '${FORWARD_REDIS_PORT:-6379}:6379' 21 + volumes: 22 + - 'advent-redis:/data' 23 + networks: 24 + - advent-network 25 + healthcheck: 26 + test: [ "CMD", "redis-cli", "ping" ] 27 + retries: 3 28 + timeout: 5s 29 + volumes: 30 + advent-postgres-data: 31 + advent-redis: 32 + networks: 33 + advent-network: 34 + driver: bridge
+78
docs/initial_plans.md
··· 1 + ## The Idea 2 + An advent of code for atproto with daily or every other day challenges for users to learn atprotocol. It will not be exactly code challenges, but more so challenges that can be verified automatically. I would like for it to be something we set up and can just enjoy when it goes live without much intervention 3 + 4 + ## Audience 5 + This will most likely target somewhat technical users, but mostly beginners. I think we should start with the simplest thing and go with beginners, if we have enough time and people working on the project the challenges could be 2 part. First is no base knowledge of atprotocol is needed, the 2nd one is a bit more challenging 6 + 7 + ## Venue/Promo/Sign up 8 + I'm thinking a shared Bluesky account that posts about the challenge when they happen and allows people to talk about it on there. We can do a discord, but if we keep it all on bsky I think people would appreciate that 9 + 10 + We host a site that users can sign into and they go there to either verify or view the history of their challenges and if they got it 11 + 12 + ## Rewards 13 + * Labeler that puts things like 1/25(solved 1 of 25)? 14 + * AT Protocol Badges? 15 + * Possible leaderboard? 16 + * Easter egg label for a hidden easter egg 17 + 18 + ## Challenge Ideas 19 + - Write a lexicon and publish to your repo. (ex. i have `dev.baileytownsend.health.steps`) just have to include the users handle, maybe even have them create `dev.baileytownsend.advent`? 20 + - Part 2 could be posting a `com.atproto.lexicon.schema` of the schema to verify along with a dns record? 21 + - Create a TID from a given time and clock id 22 + - Post a blob that is an HTML web page 23 + - find a did's prev handle (explore the plc) 24 + - Hide a tag or something similar in a bsky post 25 + - Advance - host a custom feed with a pinned post 26 + - Advance - host an endpoint to resolve various things handle -> did, did -> handle, public key for user, etc 27 + - Super easy - do atproto app records. Star a repo on tangled, play a game of at://2048, etc. Help spread awareness of atproto apps 28 + 29 + ## Challenge flow for user 30 + 1. New challenge at 00:00 UTC. Account auto posts it and it's unlocked 31 + 2. User goes to the advent site, reads what it is 32 + 1. Will also include some hints like "maybe read this atproto doc link" 33 + 3. Creates a record,dns, record, or enter a value to verify they completed the challenge 34 + 4. If successful we write a `app.advent.day.one` record to their pds, and a `app.advent.verified` record to the host account pds that can be used to verified that we did think they completed it 35 + 5. user gets a updated label 36 + 6. they can share a post that says they completed it 37 + 38 + 39 + ## Features 40 + The minimal features to make sure we get something out there 41 + * 12 challenges for 1-24 on every other day? 42 + * Automatic new challenges and verifying so we can enjoy the event 43 + * Unlocks at 00:00utc and shows on the site 44 + * advent account posts about it 45 + * Beginner friendly 46 + * Site to host challenges and backend to verify either manually or via jet stream? 47 + * labeler 48 + 49 + extended features 50 + * 24-48 challenges 1-2 a day. First is beginner friendly second builds on it and is a bit harder 51 + * leaderboard of who has the most done and who did it the fastest 52 + * account post first person daily to do it even if we dont do a leaderboard may be atleast a fun in the middle thing 53 + 54 + 55 + ## Technical 56 + 57 + * main site - We will be using Rust with axum and host it as a static site with a templating engine. My rust status sphere example has a working oauth login for static sites so it should be plug and play 58 + * JetStream listener- probably rust too 59 + * Labeler - i've never made one but i think theres a ts template so may just use it 60 + * https://gist.github.com/goeo-/58b75fa8661e54278a7b6274ad021160 61 + 62 + 63 + ## Sign ups 64 + ### Backend/Jetstream work 65 + * oppi.li 66 + * placeholder 67 + ### Challenge creator 68 + * placeholder 69 + * placeholder 70 + ### Frontend designer/creator 71 + * placeholder 72 + * placeholder 73 + ## Account admin (someone who posts to the account hyping it up) 74 + * placeholder 75 + ## Mascot 76 + * psingletary 77 + ## infra/hosting/ops 78 + * phil
+6
listener/Cargo.toml
··· 1 + [package] 2 + name = "listener" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [dependencies]
+3
listener/src/main.rs
··· 1 + fn main() { 2 + println!("Hello, world!"); 3 + }
+6
migrations/20250727151941_test_table.sql
··· 1 + -- Add migration script here 2 + CREATE TABLE IF NOT EXISTS test_table 3 + ( 4 + id BIGSERIAL PRIMARY KEY, 5 + test TEXT NOT NULL 6 + );
+19
shared/Cargo.toml
··· 1 + [package] 2 + name = "shared" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [dependencies] 7 + axum.workspace = true 8 + atrium-common.workspace = true 9 + atrium-api.workspace = true 10 + atrium-identity.workspace = true 11 + atrium-oauth.workspace = true 12 + bb8.workspace = true 13 + bb8-redis.workspace = true 14 + hickory-resolver.workspace = true 15 + serde = { version = "1.0.219", features = ["derive"] } 16 + sqlx.workspace = true 17 + thiserror = "1.0.69" 18 + serde_json.workspace = true 19 + log.workspace = true
+31
shared/src/atrium/dns_resolver.rs
··· 1 + use atrium_identity::handle::DnsTxtResolver; 2 + use hickory_resolver::TokioAsyncResolver; 3 + 4 + /// Setup for dns resolver for the handle resolver 5 + pub struct HickoryDnsTxtResolver { 6 + resolver: hickory_resolver::TokioAsyncResolver, 7 + } 8 + 9 + impl Default for HickoryDnsTxtResolver { 10 + fn default() -> Self { 11 + Self { 12 + resolver: TokioAsyncResolver::tokio_from_system_conf() 13 + .expect("failed to create resolver"), 14 + } 15 + } 16 + } 17 + 18 + impl DnsTxtResolver for HickoryDnsTxtResolver { 19 + async fn resolve( 20 + &self, 21 + query: &str, 22 + ) -> Result<Vec<String>, Box<dyn std::error::Error + Send + Sync + 'static>> { 23 + Ok(self 24 + .resolver 25 + .txt_lookup(query) 26 + .await? 27 + .iter() 28 + .map(|txt| txt.to_string()) 29 + .collect()) 30 + } 31 + }
+2
shared/src/atrium/mod.rs
··· 1 + pub mod dns_resolver; 2 + pub mod stores;
+143
shared/src/atrium/stores.rs
··· 1 + /// Storage impls to persis OAuth sessions if you are not using the memory stores 2 + /// https://github.com/bluesky-social/statusphere-example-app/blob/main/src/auth/storage.ts 3 + use crate::cache::{ATRIUM_SESSION_STORE_PREFIX, ATRIUM_STATE_STORE_KEY, create_prefixed_key}; 4 + use atrium_api::types::string::Did; 5 + use atrium_common::store::Store; 6 + use atrium_oauth::store::session::SessionStore; 7 + use atrium_oauth::store::state::StateStore; 8 + use bb8::Pool; 9 + use bb8_redis::RedisConnectionManager; 10 + use bb8_redis::redis::AsyncCommands; 11 + use serde::Serialize; 12 + use serde::de::DeserializeOwned; 13 + use std::fmt::Debug; 14 + use std::hash::Hash; 15 + use thiserror::Error; 16 + 17 + #[derive(Error, Debug)] 18 + pub enum AtriumStoreError { 19 + #[error("No session found")] 20 + NoSessionFound, 21 + #[error("Redis error: {0}")] 22 + RedisError(#[from] bb8_redis::redis::RedisError), 23 + #[error("Serialization error: {0}")] 24 + SerializationError(#[from] serde_json::Error), 25 + #[error("Database error: {0}")] 26 + DatabaseError(#[from] sqlx::Error), 27 + #[error("Pool error: {0}")] 28 + PoolError(#[from] bb8::RunError<bb8_redis::redis::RedisError>), 29 + } 30 + 31 + impl SessionStore for AtriumSessionStore {} 32 + 33 + pub struct AtriumSessionStore { 34 + cache_pool: Pool<RedisConnectionManager>, 35 + } 36 + 37 + impl AtriumSessionStore { 38 + pub fn new(pool: Pool<RedisConnectionManager>) -> Self { 39 + Self { cache_pool: pool } 40 + } 41 + } 42 + 43 + impl<K, V> Store<K, V> for AtriumSessionStore 44 + where 45 + K: Debug + Eq + Hash + Send + Sync + 'static + From<Did> + AsRef<str>, 46 + V: Debug + Clone + Send + Sync + 'static + Serialize + DeserializeOwned, 47 + { 48 + type Error = AtriumStoreError; 49 + async fn get(&self, key: &K) -> Result<Option<V>, Self::Error> { 50 + let key = create_prefixed_key(ATRIUM_SESSION_STORE_PREFIX, key.as_ref()); 51 + let mut cache = self.cache_pool.get().await?; 52 + let value: Option<String> = cache.get(key).await?; 53 + match value { 54 + Some(json_str) => { 55 + let deserialized: V = serde_json::from_str(&json_str)?; 56 + Ok(Some(deserialized)) 57 + } 58 + None => Ok(None), 59 + } 60 + } 61 + 62 + async fn set(&self, key: K, value: V) -> Result<(), Self::Error> { 63 + let cache_key = create_prefixed_key(ATRIUM_SESSION_STORE_PREFIX, key.as_ref()); 64 + let json_value = serde_json::to_string(&value)?; 65 + let mut cache = self.cache_pool.get().await?; 66 + let _: () = cache.set(cache_key, json_value).await?; 67 + Ok(()) 68 + } 69 + 70 + async fn del(&self, key: &K) -> Result<(), Self::Error> { 71 + let cache_key = create_prefixed_key(ATRIUM_SESSION_STORE_PREFIX, key.as_ref()); 72 + let mut cache = self.cache_pool.get().await?; 73 + let _: usize = cache.del(cache_key).await?; 74 + Ok(()) 75 + } 76 + 77 + async fn clear(&self) -> Result<(), Self::Error> { 78 + let pattern = format!("{}*", ATRIUM_SESSION_STORE_PREFIX); 79 + let mut cache = self.cache_pool.get().await?; 80 + let keys: Vec<String> = cache.keys(pattern).await?; 81 + if !keys.is_empty() { 82 + let _: usize = cache.del(keys).await?; 83 + } 84 + Ok(()) 85 + } 86 + } 87 + 88 + impl StateStore for AtriumStateStore {} 89 + 90 + pub struct AtriumStateStore { 91 + cache_pool: Pool<RedisConnectionManager>, 92 + } 93 + 94 + impl AtriumStateStore { 95 + pub fn new(pool: Pool<RedisConnectionManager>) -> Self { 96 + Self { cache_pool: pool } 97 + } 98 + } 99 + 100 + impl<K, V> Store<K, V> for AtriumStateStore 101 + where 102 + K: Debug + Eq + Hash + Send + Sync + 'static + From<Did> + AsRef<str>, 103 + V: Debug + Clone + Send + Sync + 'static + Serialize + DeserializeOwned, 104 + { 105 + type Error = AtriumStoreError; 106 + async fn get(&self, key: &K) -> Result<Option<V>, Self::Error> { 107 + let key = create_prefixed_key(ATRIUM_STATE_STORE_KEY, key.as_ref()); 108 + let mut cache = self.cache_pool.get().await?; 109 + let value: Option<String> = cache.get(key).await?; 110 + match value { 111 + Some(json_str) => { 112 + let deserialized: V = serde_json::from_str(&json_str)?; 113 + Ok(Some(deserialized)) 114 + } 115 + None => Ok(None), 116 + } 117 + } 118 + 119 + async fn set(&self, key: K, value: V) -> Result<(), Self::Error> { 120 + let cache_key = create_prefixed_key(ATRIUM_STATE_STORE_KEY, key.as_ref()); 121 + let json_value = serde_json::to_string(&value)?; 122 + let mut cache = self.cache_pool.get().await?; 123 + let _: () = cache.set(cache_key, json_value).await?; 124 + Ok(()) 125 + } 126 + 127 + async fn del(&self, key: &K) -> Result<(), Self::Error> { 128 + let cache_key = create_prefixed_key(ATRIUM_STATE_STORE_KEY, key.as_ref()); 129 + let mut cache = self.cache_pool.get().await?; 130 + let _: usize = cache.del(cache_key).await?; 131 + Ok(()) 132 + } 133 + 134 + async fn clear(&self) -> Result<(), Self::Error> { 135 + let pattern = format!("{}*", ATRIUM_STATE_STORE_KEY); 136 + let mut cache = self.cache_pool.get().await?; 137 + let keys: Vec<String> = cache.keys(pattern).await?; 138 + if !keys.is_empty() { 139 + let _: usize = cache.del(keys).await?; 140 + } 141 + Ok(()) 142 + } 143 + }
+156
shared/src/cache.rs
··· 1 + use crate::web_helpers::internal_error; 2 + use atrium_api::xrpc::http::StatusCode; 3 + use atrium_api::xrpc::http::request::Parts; 4 + use axum::extract::{FromRef, FromRequestParts}; 5 + use bb8::{Pool, PooledConnection}; 6 + use bb8_redis::RedisConnectionManager; 7 + use bb8_redis::redis::{AsyncCommands, FromRedisValue, RedisResult}; 8 + use serde::{Deserialize, Serialize}; 9 + use thiserror::Error; 10 + 11 + pub const ATRIUM_SESSION_STORE_PREFIX: &str = "atrium_session:"; 12 + pub const ATRIUM_STATE_STORE_KEY: &str = "atrium_state:"; 13 + 14 + pub fn create_prefixed_key(prefix: &str, key: &str) -> String { 15 + format!("{}{}", prefix, key) 16 + } 17 + 18 + pub struct Cache<'a> { 19 + redis_pool: PooledConnection<'a, RedisConnectionManager>, 20 + } 21 + 22 + #[derive(Debug, Error)] 23 + pub enum RedisFetchErrors { 24 + FromDbError, 25 + ParseError, 26 + Other(String), 27 + } 28 + 29 + impl std::fmt::Display for RedisFetchErrors { 30 + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 31 + match self { 32 + RedisFetchErrors::FromDbError => write!(f, "Error fetching from Redis database"), 33 + RedisFetchErrors::ParseError => write!(f, "Error parsing Redis data"), 34 + RedisFetchErrors::Other(msg) => write!(f, "Other error: {}", msg), 35 + } 36 + } 37 + } 38 + 39 + impl<'a> Cache<'a> { 40 + pub fn new(redis_pool: PooledConnection<'a, RedisConnectionManager>) -> Self { 41 + Self { redis_pool } 42 + } 43 + 44 + /// Writes a value to the cache at the given key 45 + pub async fn write_to_cache<T: Serialize>( 46 + &mut self, 47 + redis_key: String, 48 + data: T, 49 + ) -> RedisResult<String> { 50 + self.redis_pool 51 + .set_ex( 52 + redis_key.clone(), 53 + serde_json::to_string(&data).unwrap(), 54 + 3600, 55 + ) 56 + .await 57 + } 58 + 59 + /// Writes to the cache with an expiration in seconds. After x seconds it clears that key 60 + pub async fn write_to_cache_with_seconds<T: Serialize>( 61 + &mut self, 62 + redis_key: &str, 63 + data: T, 64 + seconds: u64, 65 + ) -> RedisResult<()> { 66 + self.redis_pool 67 + .set_ex(redis_key, serde_json::to_string(&data).unwrap(), seconds) 68 + .await 69 + } 70 + 71 + /// Fetches a saved JSON object from the cache 72 + pub async fn fetch_redis_json_object<T: for<'de> Deserialize<'de>>( 73 + &mut self, 74 + redis_key: &str, 75 + ) -> Result<Option<T>, RedisFetchErrors> { 76 + let val: RedisResult<Option<String>> = self.redis_pool.get(redis_key).await; 77 + 78 + match val { 79 + Ok(val) => match val { 80 + None => Ok(None), 81 + Some(val) => Ok(serde_json::from_str(&val).map_err(|err| { 82 + log::error!("Error parsing redis data: {}", err); 83 + RedisFetchErrors::ParseError 84 + }))?, 85 + }, 86 + Err(_) => Err(RedisFetchErrors::FromDbError), 87 + } 88 + } 89 + 90 + /// Gets a value for a key 91 + pub async fn fetch_redis<T: FromRedisValue>( 92 + &mut self, 93 + redis_key: &str, 94 + ) -> Result<T, RedisFetchErrors> { 95 + let val = self 96 + .redis_pool 97 + .get(redis_key) 98 + .await 99 + .map_err(|_| RedisFetchErrors::FromDbError)?; 100 + 101 + Ok(val) 102 + } 103 + 104 + /// Gets or sets a value for a given key 105 + pub async fn get_or_set<T, F, Fut>( 106 + &mut self, 107 + redis_key: &str, 108 + seconds: u64, 109 + fallback_fn: F, 110 + ) -> Result<T, RedisFetchErrors> 111 + where 112 + T: for<'de> Deserialize<'de> + Serialize, 113 + F: FnOnce() -> Fut, 114 + Fut: std::future::Future<Output = Result<T, RedisFetchErrors>>, 115 + { 116 + // Try to get from cache first 117 + match self.fetch_redis_json_object::<T>(redis_key).await { 118 + Ok(Some(val)) => Ok(val), 119 + Ok(None) => { 120 + // If not in cache or error, execute the fallback function 121 + let result = fallback_fn().await?; 122 + 123 + // Write the result to cache 124 + self.write_to_cache_with_seconds(redis_key, &result, seconds) 125 + .await 126 + .map_err(|err| { 127 + log::error!("Error fetching from redis: {}", err); 128 + RedisFetchErrors::FromDbError 129 + })?; 130 + 131 + Ok(result) 132 + } 133 + Err(err) => Err(err), 134 + } 135 + } 136 + } 137 + 138 + pub type ConnectionPool = Pool<RedisConnectionManager>; 139 + 140 + pub struct CacheConnection<'a>(pub Cache<'a>); 141 + 142 + impl<'a, S> FromRequestParts<S> for CacheConnection<'a> 143 + where 144 + ConnectionPool: FromRef<S>, 145 + S: Send + Sync, 146 + { 147 + type Rejection = (StatusCode, String); 148 + 149 + async fn from_request_parts(_parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> { 150 + let pool = ConnectionPool::from_ref(state); 151 + 152 + let conn = pool.get_owned().await.map_err(internal_error)?; 153 + let cache = Cache { redis_pool: conn }; 154 + Ok(Self(cache)) 155 + } 156 + }
+1
shared/src/db.rs
··· 1 +
+5
shared/src/lib.rs
··· 1 + pub mod atrium; 2 + pub mod cache; 3 + pub mod db; 4 + pub mod models; 5 + pub mod web_helpers;
+8
shared/src/models/db_models.rs
··· 1 + use serde::{Deserialize, Serialize}; 2 + use sqlx::FromRow; 3 + 4 + #[derive(FromRow, Serialize, Deserialize, Debug, Default)] 5 + pub struct TestModel { 6 + pub id: i64, 7 + pub test: String, 8 + }
+1
shared/src/models/mod.rs
··· 1 + pub mod db_models;
+10
shared/src/web_helpers.rs
··· 1 + use atrium_api::xrpc::http::StatusCode; 2 + 3 + /// Utility function for mapping any error into a `500 Internal Server Error` 4 + /// response. 5 + pub fn internal_error<E>(err: E) -> (StatusCode, String) 6 + where 7 + E: std::error::Error, 8 + { 9 + (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()) 10 + }
-31
src/main.rs
··· 1 - use axum::extract::Path; 2 - use axum::{Router, middleware, routing::get}; 3 - use std::net::{IpAddr, Ipv4Addr, SocketAddr}; 4 - use std::time; 5 - 6 - mod unlock; 7 - 8 - #[tokio::main] 9 - async fn main() { 10 - let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 7878); 11 - let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); 12 - println!("listening on {}", addr); 13 - 14 - let now = time::Instant::now(); 15 - let daily = time::Duration::from_secs(24 * 60 * 60); 16 - let state = unlock::Unlock::new(now, daily); 17 - 18 - let app = 19 - Router::new() 20 - .route("/day/{id}", get(handler)) 21 - .route_layer(middleware::from_fn_with_state( 22 - state.clone(), 23 - unlock::unlock, 24 - )); 25 - 26 - axum::serve(listener, app).await.unwrap(); 27 - } 28 - 29 - async fn handler(Path(id): Path<u32>) -> String { 30 - format!("hello day {id}") 31 - }
-1
src/unlock.rs web/src/unlock.rs
··· 29 29 if now >= deadline { 30 30 return next.run(request).await; 31 31 } 32 - 33 32 let time_remaining = deadline.saturating_duration_since(now); 34 33 let error_response = axum::Json(serde_json::json!({ 35 34 "error": "Route Locked",
+714
web/Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 4 4 + 5 + [[package]] 6 + name = "addr2line" 7 + version = "0.24.2" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 + dependencies = [ 11 + "gimli", 12 + ] 13 + 14 + [[package]] 15 + name = "adler2" 16 + version = "2.0.1" 17 + source = "registry+https://github.com/rust-lang/crates.io-index" 18 + checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" 19 + 20 + [[package]] 21 + name = "at-advent" 22 + version = "0.1.0" 23 + dependencies = [ 24 + "axum", 25 + "serde_json", 26 + "tokio", 27 + ] 28 + 29 + [[package]] 30 + name = "autocfg" 31 + version = "1.5.0" 32 + source = "registry+https://github.com/rust-lang/crates.io-index" 33 + checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 34 + 35 + [[package]] 36 + name = "axum" 37 + version = "0.8.4" 38 + source = "registry+https://github.com/rust-lang/crates.io-index" 39 + checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" 40 + dependencies = [ 41 + "axum-core", 42 + "bytes", 43 + "form_urlencoded", 44 + "futures-util", 45 + "http", 46 + "http-body", 47 + "http-body-util", 48 + "hyper", 49 + "hyper-util", 50 + "itoa", 51 + "matchit", 52 + "memchr", 53 + "mime", 54 + "percent-encoding", 55 + "pin-project-lite", 56 + "rustversion", 57 + "serde", 58 + "serde_json", 59 + "serde_path_to_error", 60 + "serde_urlencoded", 61 + "sync_wrapper", 62 + "tokio", 63 + "tower", 64 + "tower-layer", 65 + "tower-service", 66 + "tracing", 67 + ] 68 + 69 + [[package]] 70 + name = "axum-core" 71 + version = "0.5.2" 72 + source = "registry+https://github.com/rust-lang/crates.io-index" 73 + checksum = "68464cd0412f486726fb3373129ef5d2993f90c34bc2bc1c1e9943b2f4fc7ca6" 74 + dependencies = [ 75 + "bytes", 76 + "futures-core", 77 + "http", 78 + "http-body", 79 + "http-body-util", 80 + "mime", 81 + "pin-project-lite", 82 + "rustversion", 83 + "sync_wrapper", 84 + "tower-layer", 85 + "tower-service", 86 + "tracing", 87 + ] 88 + 89 + [[package]] 90 + name = "backtrace" 91 + version = "0.3.75" 92 + source = "registry+https://github.com/rust-lang/crates.io-index" 93 + checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" 94 + dependencies = [ 95 + "addr2line", 96 + "cfg-if", 97 + "libc", 98 + "miniz_oxide", 99 + "object", 100 + "rustc-demangle", 101 + "windows-targets", 102 + ] 103 + 104 + [[package]] 105 + name = "bitflags" 106 + version = "2.9.1" 107 + source = "registry+https://github.com/rust-lang/crates.io-index" 108 + checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" 109 + 110 + [[package]] 111 + name = "bytes" 112 + version = "1.10.1" 113 + source = "registry+https://github.com/rust-lang/crates.io-index" 114 + checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 115 + 116 + [[package]] 117 + name = "cfg-if" 118 + version = "1.0.1" 119 + source = "registry+https://github.com/rust-lang/crates.io-index" 120 + checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268" 121 + 122 + [[package]] 123 + name = "fnv" 124 + version = "1.0.7" 125 + source = "registry+https://github.com/rust-lang/crates.io-index" 126 + checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 127 + 128 + [[package]] 129 + name = "form_urlencoded" 130 + version = "1.2.1" 131 + source = "registry+https://github.com/rust-lang/crates.io-index" 132 + checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 133 + dependencies = [ 134 + "percent-encoding", 135 + ] 136 + 137 + [[package]] 138 + name = "futures-channel" 139 + version = "0.3.31" 140 + source = "registry+https://github.com/rust-lang/crates.io-index" 141 + checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 142 + dependencies = [ 143 + "futures-core", 144 + ] 145 + 146 + [[package]] 147 + name = "futures-core" 148 + version = "0.3.31" 149 + source = "registry+https://github.com/rust-lang/crates.io-index" 150 + checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 151 + 152 + [[package]] 153 + name = "futures-task" 154 + version = "0.3.31" 155 + source = "registry+https://github.com/rust-lang/crates.io-index" 156 + checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 157 + 158 + [[package]] 159 + name = "futures-util" 160 + version = "0.3.31" 161 + source = "registry+https://github.com/rust-lang/crates.io-index" 162 + checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 163 + dependencies = [ 164 + "futures-core", 165 + "futures-task", 166 + "pin-project-lite", 167 + "pin-utils", 168 + ] 169 + 170 + [[package]] 171 + name = "gimli" 172 + version = "0.31.1" 173 + source = "registry+https://github.com/rust-lang/crates.io-index" 174 + checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 175 + 176 + [[package]] 177 + name = "http" 178 + version = "1.3.1" 179 + source = "registry+https://github.com/rust-lang/crates.io-index" 180 + checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 181 + dependencies = [ 182 + "bytes", 183 + "fnv", 184 + "itoa", 185 + ] 186 + 187 + [[package]] 188 + name = "http-body" 189 + version = "1.0.1" 190 + source = "registry+https://github.com/rust-lang/crates.io-index" 191 + checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 192 + dependencies = [ 193 + "bytes", 194 + "http", 195 + ] 196 + 197 + [[package]] 198 + name = "http-body-util" 199 + version = "0.1.3" 200 + source = "registry+https://github.com/rust-lang/crates.io-index" 201 + checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 202 + dependencies = [ 203 + "bytes", 204 + "futures-core", 205 + "http", 206 + "http-body", 207 + "pin-project-lite", 208 + ] 209 + 210 + [[package]] 211 + name = "httparse" 212 + version = "1.10.1" 213 + source = "registry+https://github.com/rust-lang/crates.io-index" 214 + checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 215 + 216 + [[package]] 217 + name = "httpdate" 218 + version = "1.0.3" 219 + source = "registry+https://github.com/rust-lang/crates.io-index" 220 + checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 221 + 222 + [[package]] 223 + name = "hyper" 224 + version = "1.6.0" 225 + source = "registry+https://github.com/rust-lang/crates.io-index" 226 + checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" 227 + dependencies = [ 228 + "bytes", 229 + "futures-channel", 230 + "futures-util", 231 + "http", 232 + "http-body", 233 + "httparse", 234 + "httpdate", 235 + "itoa", 236 + "pin-project-lite", 237 + "smallvec", 238 + "tokio", 239 + ] 240 + 241 + [[package]] 242 + name = "hyper-util" 243 + version = "0.1.16" 244 + source = "registry+https://github.com/rust-lang/crates.io-index" 245 + checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" 246 + dependencies = [ 247 + "bytes", 248 + "futures-core", 249 + "http", 250 + "http-body", 251 + "hyper", 252 + "pin-project-lite", 253 + "tokio", 254 + "tower-service", 255 + ] 256 + 257 + [[package]] 258 + name = "io-uring" 259 + version = "0.7.9" 260 + source = "registry+https://github.com/rust-lang/crates.io-index" 261 + checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" 262 + dependencies = [ 263 + "bitflags", 264 + "cfg-if", 265 + "libc", 266 + ] 267 + 268 + [[package]] 269 + name = "itoa" 270 + version = "1.0.15" 271 + source = "registry+https://github.com/rust-lang/crates.io-index" 272 + checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 273 + 274 + [[package]] 275 + name = "libc" 276 + version = "0.2.174" 277 + source = "registry+https://github.com/rust-lang/crates.io-index" 278 + checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776" 279 + 280 + [[package]] 281 + name = "lock_api" 282 + version = "0.4.13" 283 + source = "registry+https://github.com/rust-lang/crates.io-index" 284 + checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" 285 + dependencies = [ 286 + "autocfg", 287 + "scopeguard", 288 + ] 289 + 290 + [[package]] 291 + name = "log" 292 + version = "0.4.27" 293 + source = "registry+https://github.com/rust-lang/crates.io-index" 294 + checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 295 + 296 + [[package]] 297 + name = "matchit" 298 + version = "0.8.4" 299 + source = "registry+https://github.com/rust-lang/crates.io-index" 300 + checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 301 + 302 + [[package]] 303 + name = "memchr" 304 + version = "2.7.5" 305 + source = "registry+https://github.com/rust-lang/crates.io-index" 306 + checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" 307 + 308 + [[package]] 309 + name = "mime" 310 + version = "0.3.17" 311 + source = "registry+https://github.com/rust-lang/crates.io-index" 312 + checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 313 + 314 + [[package]] 315 + name = "miniz_oxide" 316 + version = "0.8.9" 317 + source = "registry+https://github.com/rust-lang/crates.io-index" 318 + checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" 319 + dependencies = [ 320 + "adler2", 321 + ] 322 + 323 + [[package]] 324 + name = "mio" 325 + version = "1.0.4" 326 + source = "registry+https://github.com/rust-lang/crates.io-index" 327 + checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" 328 + dependencies = [ 329 + "libc", 330 + "wasi", 331 + "windows-sys 0.59.0", 332 + ] 333 + 334 + [[package]] 335 + name = "object" 336 + version = "0.36.7" 337 + source = "registry+https://github.com/rust-lang/crates.io-index" 338 + checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 339 + dependencies = [ 340 + "memchr", 341 + ] 342 + 343 + [[package]] 344 + name = "once_cell" 345 + version = "1.21.3" 346 + source = "registry+https://github.com/rust-lang/crates.io-index" 347 + checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 348 + 349 + [[package]] 350 + name = "parking_lot" 351 + version = "0.12.4" 352 + source = "registry+https://github.com/rust-lang/crates.io-index" 353 + checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" 354 + dependencies = [ 355 + "lock_api", 356 + "parking_lot_core", 357 + ] 358 + 359 + [[package]] 360 + name = "parking_lot_core" 361 + version = "0.9.11" 362 + source = "registry+https://github.com/rust-lang/crates.io-index" 363 + checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" 364 + dependencies = [ 365 + "cfg-if", 366 + "libc", 367 + "redox_syscall", 368 + "smallvec", 369 + "windows-targets", 370 + ] 371 + 372 + [[package]] 373 + name = "percent-encoding" 374 + version = "2.3.1" 375 + source = "registry+https://github.com/rust-lang/crates.io-index" 376 + checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 377 + 378 + [[package]] 379 + name = "pin-project-lite" 380 + version = "0.2.16" 381 + source = "registry+https://github.com/rust-lang/crates.io-index" 382 + checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 383 + 384 + [[package]] 385 + name = "pin-utils" 386 + version = "0.1.0" 387 + source = "registry+https://github.com/rust-lang/crates.io-index" 388 + checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 389 + 390 + [[package]] 391 + name = "proc-macro2" 392 + version = "1.0.95" 393 + source = "registry+https://github.com/rust-lang/crates.io-index" 394 + checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 395 + dependencies = [ 396 + "unicode-ident", 397 + ] 398 + 399 + [[package]] 400 + name = "quote" 401 + version = "1.0.40" 402 + source = "registry+https://github.com/rust-lang/crates.io-index" 403 + checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 404 + dependencies = [ 405 + "proc-macro2", 406 + ] 407 + 408 + [[package]] 409 + name = "redox_syscall" 410 + version = "0.5.13" 411 + source = "registry+https://github.com/rust-lang/crates.io-index" 412 + checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6" 413 + dependencies = [ 414 + "bitflags", 415 + ] 416 + 417 + [[package]] 418 + name = "rustc-demangle" 419 + version = "0.1.25" 420 + source = "registry+https://github.com/rust-lang/crates.io-index" 421 + checksum = "989e6739f80c4ad5b13e0fd7fe89531180375b18520cc8c82080e4dc4035b84f" 422 + 423 + [[package]] 424 + name = "rustversion" 425 + version = "1.0.21" 426 + source = "registry+https://github.com/rust-lang/crates.io-index" 427 + checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" 428 + 429 + [[package]] 430 + name = "ryu" 431 + version = "1.0.20" 432 + source = "registry+https://github.com/rust-lang/crates.io-index" 433 + checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 434 + 435 + [[package]] 436 + name = "scopeguard" 437 + version = "1.2.0" 438 + source = "registry+https://github.com/rust-lang/crates.io-index" 439 + checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 440 + 441 + [[package]] 442 + name = "serde" 443 + version = "1.0.219" 444 + source = "registry+https://github.com/rust-lang/crates.io-index" 445 + checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 446 + dependencies = [ 447 + "serde_derive", 448 + ] 449 + 450 + [[package]] 451 + name = "serde_derive" 452 + version = "1.0.219" 453 + source = "registry+https://github.com/rust-lang/crates.io-index" 454 + checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 455 + dependencies = [ 456 + "proc-macro2", 457 + "quote", 458 + "syn", 459 + ] 460 + 461 + [[package]] 462 + name = "serde_json" 463 + version = "1.0.141" 464 + source = "registry+https://github.com/rust-lang/crates.io-index" 465 + checksum = "30b9eff21ebe718216c6ec64e1d9ac57087aad11efc64e32002bce4a0d4c03d3" 466 + dependencies = [ 467 + "itoa", 468 + "memchr", 469 + "ryu", 470 + "serde", 471 + ] 472 + 473 + [[package]] 474 + name = "serde_path_to_error" 475 + version = "0.1.17" 476 + source = "registry+https://github.com/rust-lang/crates.io-index" 477 + checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" 478 + dependencies = [ 479 + "itoa", 480 + "serde", 481 + ] 482 + 483 + [[package]] 484 + name = "serde_urlencoded" 485 + version = "0.7.1" 486 + source = "registry+https://github.com/rust-lang/crates.io-index" 487 + checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 488 + dependencies = [ 489 + "form_urlencoded", 490 + "itoa", 491 + "ryu", 492 + "serde", 493 + ] 494 + 495 + [[package]] 496 + name = "signal-hook-registry" 497 + version = "1.4.5" 498 + source = "registry+https://github.com/rust-lang/crates.io-index" 499 + checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" 500 + dependencies = [ 501 + "libc", 502 + ] 503 + 504 + [[package]] 505 + name = "slab" 506 + version = "0.4.10" 507 + source = "registry+https://github.com/rust-lang/crates.io-index" 508 + checksum = "04dc19736151f35336d325007ac991178d504a119863a2fcb3758cdb5e52c50d" 509 + 510 + [[package]] 511 + name = "smallvec" 512 + version = "1.15.1" 513 + source = "registry+https://github.com/rust-lang/crates.io-index" 514 + checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 515 + 516 + [[package]] 517 + name = "socket2" 518 + version = "0.5.10" 519 + source = "registry+https://github.com/rust-lang/crates.io-index" 520 + checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" 521 + dependencies = [ 522 + "libc", 523 + "windows-sys 0.52.0", 524 + ] 525 + 526 + [[package]] 527 + name = "syn" 528 + version = "2.0.104" 529 + source = "registry+https://github.com/rust-lang/crates.io-index" 530 + checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40" 531 + dependencies = [ 532 + "proc-macro2", 533 + "quote", 534 + "unicode-ident", 535 + ] 536 + 537 + [[package]] 538 + name = "sync_wrapper" 539 + version = "1.0.2" 540 + source = "registry+https://github.com/rust-lang/crates.io-index" 541 + checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 542 + 543 + [[package]] 544 + name = "tokio" 545 + version = "1.46.1" 546 + source = "registry+https://github.com/rust-lang/crates.io-index" 547 + checksum = "0cc3a2344dafbe23a245241fe8b09735b521110d30fcefbbd5feb1797ca35d17" 548 + dependencies = [ 549 + "backtrace", 550 + "bytes", 551 + "io-uring", 552 + "libc", 553 + "mio", 554 + "parking_lot", 555 + "pin-project-lite", 556 + "signal-hook-registry", 557 + "slab", 558 + "socket2", 559 + "tokio-macros", 560 + "windows-sys 0.52.0", 561 + ] 562 + 563 + [[package]] 564 + name = "tokio-macros" 565 + version = "2.5.0" 566 + source = "registry+https://github.com/rust-lang/crates.io-index" 567 + checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 568 + dependencies = [ 569 + "proc-macro2", 570 + "quote", 571 + "syn", 572 + ] 573 + 574 + [[package]] 575 + name = "tower" 576 + version = "0.5.2" 577 + source = "registry+https://github.com/rust-lang/crates.io-index" 578 + checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 579 + dependencies = [ 580 + "futures-core", 581 + "futures-util", 582 + "pin-project-lite", 583 + "sync_wrapper", 584 + "tokio", 585 + "tower-layer", 586 + "tower-service", 587 + "tracing", 588 + ] 589 + 590 + [[package]] 591 + name = "tower-layer" 592 + version = "0.3.3" 593 + source = "registry+https://github.com/rust-lang/crates.io-index" 594 + checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 595 + 596 + [[package]] 597 + name = "tower-service" 598 + version = "0.3.3" 599 + source = "registry+https://github.com/rust-lang/crates.io-index" 600 + checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 601 + 602 + [[package]] 603 + name = "tracing" 604 + version = "0.1.41" 605 + source = "registry+https://github.com/rust-lang/crates.io-index" 606 + checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 607 + dependencies = [ 608 + "log", 609 + "pin-project-lite", 610 + "tracing-core", 611 + ] 612 + 613 + [[package]] 614 + name = "tracing-core" 615 + version = "0.1.34" 616 + source = "registry+https://github.com/rust-lang/crates.io-index" 617 + checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" 618 + dependencies = [ 619 + "once_cell", 620 + ] 621 + 622 + [[package]] 623 + name = "unicode-ident" 624 + version = "1.0.18" 625 + source = "registry+https://github.com/rust-lang/crates.io-index" 626 + checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 627 + 628 + [[package]] 629 + name = "wasi" 630 + version = "0.11.1+wasi-snapshot-preview1" 631 + source = "registry+https://github.com/rust-lang/crates.io-index" 632 + checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 633 + 634 + [[package]] 635 + name = "windows-sys" 636 + version = "0.52.0" 637 + source = "registry+https://github.com/rust-lang/crates.io-index" 638 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 639 + dependencies = [ 640 + "windows-targets", 641 + ] 642 + 643 + [[package]] 644 + name = "windows-sys" 645 + version = "0.59.0" 646 + source = "registry+https://github.com/rust-lang/crates.io-index" 647 + checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 648 + dependencies = [ 649 + "windows-targets", 650 + ] 651 + 652 + [[package]] 653 + name = "windows-targets" 654 + version = "0.52.6" 655 + source = "registry+https://github.com/rust-lang/crates.io-index" 656 + checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 657 + dependencies = [ 658 + "windows_aarch64_gnullvm", 659 + "windows_aarch64_msvc", 660 + "windows_i686_gnu", 661 + "windows_i686_gnullvm", 662 + "windows_i686_msvc", 663 + "windows_x86_64_gnu", 664 + "windows_x86_64_gnullvm", 665 + "windows_x86_64_msvc", 666 + ] 667 + 668 + [[package]] 669 + name = "windows_aarch64_gnullvm" 670 + version = "0.52.6" 671 + source = "registry+https://github.com/rust-lang/crates.io-index" 672 + checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 673 + 674 + [[package]] 675 + name = "windows_aarch64_msvc" 676 + version = "0.52.6" 677 + source = "registry+https://github.com/rust-lang/crates.io-index" 678 + checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 679 + 680 + [[package]] 681 + name = "windows_i686_gnu" 682 + version = "0.52.6" 683 + source = "registry+https://github.com/rust-lang/crates.io-index" 684 + checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 685 + 686 + [[package]] 687 + name = "windows_i686_gnullvm" 688 + version = "0.52.6" 689 + source = "registry+https://github.com/rust-lang/crates.io-index" 690 + checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 691 + 692 + [[package]] 693 + name = "windows_i686_msvc" 694 + version = "0.52.6" 695 + source = "registry+https://github.com/rust-lang/crates.io-index" 696 + checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 697 + 698 + [[package]] 699 + name = "windows_x86_64_gnu" 700 + version = "0.52.6" 701 + source = "registry+https://github.com/rust-lang/crates.io-index" 702 + checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 703 + 704 + [[package]] 705 + name = "windows_x86_64_gnullvm" 706 + version = "0.52.6" 707 + source = "registry+https://github.com/rust-lang/crates.io-index" 708 + checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 709 + 710 + [[package]] 711 + name = "windows_x86_64_msvc" 712 + version = "0.52.6" 713 + source = "registry+https://github.com/rust-lang/crates.io-index" 714 + checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+25
web/Cargo.toml
··· 1 + [package] 2 + name = "web" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [dependencies] 7 + atrium-common.workspace = true 8 + atrium-api.workspace = true 9 + atrium-identity.workspace = true 10 + atrium-oauth.workspace = true 11 + axum.workspace = true 12 + bb8.workspace = true 13 + bb8-redis.workspace = true 14 + dotenv.workspace = true 15 + log.workspace = true 16 + redis.workspace = true 17 + serde_json.workspace = true 18 + shared.workspace = true 19 + sqlx.workspace = true 20 + tokio = { version = "1.46.1", features = ["full"] } 21 + tower-http = { version = "0.6.6", features = ["trace"] } 22 + tower-sessions = "0.14.0" 23 + tracing.workspace = true 24 + tracing-subscriber.workspace = true 25 + serde = { version = "1.0.219", features = ["derive"] }
+66
web/src/extractors.rs
··· 1 + use crate::{AppState, OAuthClientType}; 2 + use axum::extract::{FromRef, FromRequestParts}; 3 + use axum::http::StatusCode; 4 + use axum::http::request::Parts; 5 + use shared::cache::ConnectionPool; 6 + use shared::web_helpers::internal_error; 7 + use sqlx::PgPool; 8 + 9 + #[allow(dead_code)] 10 + struct DatabaseConnection(sqlx::pool::PoolConnection<sqlx::Postgres>); 11 + 12 + impl<S> FromRequestParts<S> for DatabaseConnection 13 + where 14 + PgPool: FromRef<S>, 15 + S: Send + Sync, 16 + { 17 + type Rejection = (StatusCode, String); 18 + 19 + async fn from_request_parts(_parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> { 20 + let pool = PgPool::from_ref(state); 21 + 22 + let conn = pool.acquire().await.map_err(internal_error)?; 23 + 24 + Ok(Self(conn)) 25 + } 26 + } 27 + 28 + //Redis extractor 29 + 30 + // pub type AtProtoClient = OAuthClientType; 31 + 32 + #[allow(dead_code)] 33 + pub struct AtProtoClient(OAuthClientType); 34 + 35 + impl<S> FromRequestParts<S> for AtProtoClient 36 + where 37 + OAuthClientType: FromRef<S>, 38 + S: Send + Sync, 39 + { 40 + type Rejection = (StatusCode, String); 41 + 42 + async fn from_request_parts(_parts: &mut Parts, state: &S) -> Result<Self, Self::Rejection> { 43 + let client = OAuthClientType::from_ref(state); 44 + Ok(Self(client)) 45 + } 46 + } 47 + 48 + //From refs 49 + 50 + impl FromRef<AppState> for PgPool { 51 + fn from_ref(app_state: &AppState) -> PgPool { 52 + app_state.postgres_pool.clone() 53 + } 54 + } 55 + 56 + impl FromRef<AppState> for ConnectionPool { 57 + fn from_ref(app_state: &AppState) -> ConnectionPool { 58 + app_state.redis_pool.clone() 59 + } 60 + } 61 + 62 + impl FromRef<AppState> for OAuthClientType { 63 + fn from_ref(app_state: &AppState) -> OAuthClientType { 64 + app_state.oauth_client.clone() 65 + } 66 + }
+309
web/src/main.rs
··· 1 + use atrium_api::agent::Agent; 2 + use atrium_api::types::string::Did; 3 + use atrium_identity::did::{CommonDidResolver, CommonDidResolverConfig, DEFAULT_PLC_DIRECTORY_URL}; 4 + use atrium_identity::handle::{AtprotoHandleResolver, AtprotoHandleResolverConfig}; 5 + use atrium_oauth::{ 6 + AtprotoLocalhostClientMetadata, AuthorizeOptions, CallbackParams, DefaultHttpClient, 7 + KnownScope, OAuthClient, OAuthClientConfig, OAuthResolverConfig, Scope, 8 + }; 9 + use axum::extract::{Query, State}; 10 + use axum::http::StatusCode; 11 + use axum::{Json, Router, extract::Path, middleware, routing::get}; 12 + use bb8_redis::RedisConnectionManager; 13 + use dotenv::dotenv; 14 + use redis::AsyncCommands; 15 + use shared::atrium::dns_resolver::HickoryDnsTxtResolver; 16 + use shared::atrium::stores::{AtriumSessionStore, AtriumStateStore}; 17 + use shared::cache::CacheConnection; 18 + use shared::models::db_models::TestModel; 19 + use sqlx::PgPool; 20 + use sqlx::postgres::PgPoolOptions; 21 + use std::sync::Arc; 22 + use std::{ 23 + env, 24 + net::{IpAddr, Ipv4Addr, SocketAddr}, 25 + time, 26 + }; 27 + use time::Duration; 28 + use tower_http::trace::TraceLayer; 29 + use tower_sessions::{MemoryStore, Session, SessionManagerLayer}; 30 + use tracing_subscriber::EnvFilter; 31 + 32 + extern crate dotenv; 33 + 34 + mod extractors; 35 + mod unlock; 36 + 37 + #[derive(Clone)] 38 + struct AppState { 39 + postgres_pool: PgPool, 40 + redis_pool: bb8::Pool<RedisConnectionManager>, 41 + oauth_client: OAuthClientType, 42 + //Used to get did to handle leaving cause I figured we'd need it 43 + _handle_resolver: HandleResolver, 44 + } 45 + 46 + /// OAuthClientType to make it easier to access the OAuthClient in web requests 47 + type OAuthClientType = Arc< 48 + OAuthClient< 49 + AtriumStateStore, 50 + AtriumSessionStore, 51 + CommonDidResolver<DefaultHttpClient>, 52 + AtprotoHandleResolver<HickoryDnsTxtResolver, DefaultHttpClient>, 53 + >, 54 + >; 55 + 56 + /// HandleResolver type to make it easier to access the resolver in web requests 57 + type HandleResolver = Arc<CommonDidResolver<DefaultHttpClient>>; 58 + 59 + #[tokio::main] 60 + async fn main() -> Result<(), Box<dyn std::error::Error>> { 61 + dotenv().ok(); 62 + 63 + //Sets up logging/tracing 64 + tracing_subscriber::fmt() 65 + .with_env_filter( 66 + EnvFilter::try_from_default_env() 67 + .or_else(|_| EnvFilter::try_new("info,axum_tracing_example=error,tower_http=warn")) 68 + .unwrap(), 69 + ) 70 + .init(); 71 + 72 + let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 7878); 73 + let host = addr.ip(); 74 + let port = addr.port(); 75 + let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); 76 + 77 + let now = time::Instant::now(); 78 + let daily = time::Duration::from_secs(24 * 60 * 60); 79 + let state = unlock::Unlock::new(now, daily); 80 + 81 + //sqlx pool 82 + let database_url = 83 + env::var("DATABASE_URL").expect("DATABASE_URL must be set in the environment or .env"); 84 + 85 + // set up a postgres connection pool 86 + let postgres_pool = PgPoolOptions::new() 87 + .max_connections(5) 88 + .acquire_timeout(Duration::from_secs(3)) 89 + .connect(&database_url) 90 + .await 91 + .expect("can't connect to database"); 92 + 93 + // redis pool setup 94 + let redis_url = 95 + env::var("REDIS_URL").expect("REDIS_URL must be set in the environment or .env"); 96 + let manager = RedisConnectionManager::new(redis_url.clone()).unwrap(); 97 + let redis_pool = bb8::Pool::builder().build(manager).await.unwrap(); 98 + //cam be deleted, just an example for the test endpoint 99 + { 100 + // ping the database before starting 101 + let mut conn = redis_pool.get().await.unwrap(); 102 + conn.set::<&str, &str, ()>("foo", "bar").await.unwrap(); 103 + let result: String = conn.get("foo").await.unwrap(); 104 + assert_eq!(result, "bar"); 105 + } 106 + 107 + //Atrium/atproto setup 108 + 109 + //Create a new handle resolver for the home page 110 + let http_client = Arc::new(DefaultHttpClient::default()); 111 + 112 + let handle_resolver = CommonDidResolver::new(CommonDidResolverConfig { 113 + plc_directory_url: DEFAULT_PLC_DIRECTORY_URL.to_string(), 114 + http_client: http_client.clone(), 115 + }); 116 + let handle_resolver = Arc::new(handle_resolver); 117 + 118 + // Create a new OAuth client 119 + let http_client = Arc::new(DefaultHttpClient::default()); 120 + let config = OAuthClientConfig { 121 + client_metadata: AtprotoLocalhostClientMetadata { 122 + redirect_uris: Some(vec![String::from(format!( 123 + //This must match the endpoint you use the callback function 124 + "http://{host}:{port}/oauth/callback" 125 + ))]), 126 + scopes: Some(vec![ 127 + Scope::Known(KnownScope::Atproto), 128 + Scope::Known(KnownScope::TransitionGeneric), 129 + ]), 130 + }, 131 + keys: None, 132 + resolver: OAuthResolverConfig { 133 + did_resolver: CommonDidResolver::new(CommonDidResolverConfig { 134 + plc_directory_url: DEFAULT_PLC_DIRECTORY_URL.to_string(), 135 + http_client: http_client.clone(), 136 + }), 137 + handle_resolver: AtprotoHandleResolver::new(AtprotoHandleResolverConfig { 138 + dns_txt_resolver: HickoryDnsTxtResolver::default(), 139 + http_client: http_client.clone(), 140 + }), 141 + authorization_server_metadata: Default::default(), 142 + protected_resource_metadata: Default::default(), 143 + }, 144 + state_store: AtriumStateStore::new(redis_pool.clone()), 145 + session_store: AtriumSessionStore::new(redis_pool.clone()), 146 + }; 147 + let client = Arc::new(OAuthClient::new(config).expect("failed to create OAuth client")); 148 + 149 + //tower sessions setup. Using in memory for now, something is off about the redis one will implement our own via the trait using bb8 pool 150 + // https://docs.rs/tower-sessions/latest/tower_sessions/trait.SessionStore.html 151 + let session_store = MemoryStore::default(); 152 + let session_layer = SessionManagerLayer::new(session_store).with_secure(false); 153 + 154 + let app_state = AppState { 155 + postgres_pool, 156 + redis_pool, 157 + oauth_client: client, 158 + _handle_resolver: handle_resolver, 159 + }; 160 + 161 + log::info!("listening on http://{}", addr); 162 + let app = Router::new() 163 + .route( 164 + "/day/{id}", 165 + get(handler).route_layer(middleware::from_fn_with_state( 166 + state.clone(), 167 + unlock::unlock, 168 + )), 169 + ) 170 + .route("/sql-test", get(sql_test_handler)) 171 + .route("/redis-test", get(redis_test_handler)) 172 + .route("/login/{handle}", get(login_test_handler)) 173 + .route("/oauth/callback", get(oauth_callback_handler)) 174 + .route("/logged-in", get(logged_in_test_handler)) 175 + .layer(session_layer) 176 + .with_state(app_state) 177 + .layer(TraceLayer::new_for_http()); 178 + axum::serve(listener, app).await?; 179 + Ok(()) 180 + } 181 + 182 + async fn handler(Path(id): Path<u32>) -> String { 183 + format!("hello day {id}") 184 + } 185 + 186 + async fn sql_test_handler(State(pool): State<PgPool>) -> Json<Vec<TestModel>> { 187 + Json( 188 + sqlx::query_as::<_, TestModel>("SELECT id, test FROM test_table") 189 + .fetch_all(&pool) 190 + .await 191 + .unwrap(), 192 + ) 193 + } 194 + 195 + /// Pass in your handle like /login/baileytownsend.dev 196 + async fn login_test_handler( 197 + Path(handle): Path<String>, 198 + State(oauth_client): State<OAuthClientType>, 199 + ) -> String { 200 + match atrium_api::types::string::Handle::new(handle) { 201 + Ok(handle) => { 202 + //Creates the oauth url to redirect to for the user to log in with their credentials 203 + let oauth_url = oauth_client 204 + .authorize( 205 + &handle, 206 + AuthorizeOptions { 207 + scopes: vec![ 208 + Scope::Known(KnownScope::Atproto), 209 + Scope::Known(KnownScope::TransitionGeneric), 210 + ], 211 + ..Default::default() 212 + }, 213 + ) 214 + .await; 215 + oauth_url.unwrap_or_else(|err| { 216 + log::error!("Error: {err}"); 217 + err.to_string() 218 + }) 219 + } 220 + Err(err) => err.to_string(), 221 + } 222 + } 223 + 224 + ///End point that takes back the OAuth call back and creates a session 225 + async fn oauth_callback_handler( 226 + params: Query<CallbackParams>, 227 + State(oauth_client): State<OAuthClientType>, 228 + session: Session, 229 + ) -> String { 230 + //HACK, yeah I gave up... hoping someone has a better solution 231 + let call_back_params = CallbackParams { 232 + code: params.code.clone(), 233 + state: params.state.clone(), 234 + iss: params.iss.clone(), 235 + }; 236 + match oauth_client.callback(call_back_params).await { 237 + Ok((bsky_session, _)) => { 238 + let agent = Agent::new(bsky_session); 239 + match agent.did().await { 240 + Some(did) => { 241 + session.insert("did", did.clone()).await.unwrap(); 242 + format!("Session created for {}", did.to_string()) 243 + // did.to_string() 244 + // session.insert("did", did).unwrap(); 245 + // Redirect::to("/") 246 + // .see_other() 247 + // .respond_to(&request) 248 + // .map_into_boxed_body() 249 + } 250 + None => String::from("No DID found"), 251 + } 252 + } 253 + Err(err) => { 254 + log::error!("Error: {err}"); 255 + err.to_string() 256 + } 257 + } 258 + } 259 + 260 + async fn logged_in_test_handler( 261 + State(oauth_client): State<OAuthClientType>, 262 + session: Session, 263 + ) -> String { 264 + let session_did = session.get::<String>("did").await.unwrap().unwrap(); 265 + let did = Did::new(session_did).expect("failed to parse did"); 266 + let client = oauth_client.restore(&did).await.unwrap(); 267 + let agent = Agent::new(client); 268 + let notifications = agent 269 + .api 270 + .app 271 + .bsky 272 + .notification 273 + .list_notifications( 274 + atrium_api::app::bsky::notification::list_notifications::ParametersData { 275 + cursor: None, 276 + limit: None, 277 + priority: None, 278 + reasons: None, 279 + seen_at: None, 280 + } 281 + .into(), 282 + ) 283 + .await 284 + .unwrap(); 285 + 286 + notifications 287 + .notifications 288 + .iter() 289 + .map(|n| { 290 + format!( 291 + "Author: {} Reason: {}, URI: {}", 292 + n.author.handle.as_str(), 293 + n.reason, 294 + n.uri 295 + ) 296 + }) 297 + .collect::<Vec<String>>() 298 + .join("\n") 299 + } 300 + 301 + async fn redis_test_handler( 302 + CacheConnection(mut conn): CacheConnection<'_>, 303 + ) -> Result<String, (StatusCode, String)> { 304 + let result: String = conn 305 + .fetch_redis("foo") 306 + .await 307 + .map_err(|e| (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()))?; 308 + Ok(result) 309 + }