feat: setup github provider with generic trait, proper routes, session & jwt handling, errors & user agent

This commit is contained in:
Ryan Walters
2025-09-17 03:32:32 -05:00
parent 264478bdaa
commit f3db44c48b
12 changed files with 604 additions and 20 deletions

88
Cargo.lock generated
View File

@@ -87,6 +87,17 @@ dependencies = [
"portable-atomic",
]
[[package]]
name = "async-trait"
version = "0.1.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "atoi"
version = "2.0.0"
@@ -127,6 +138,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5"
dependencies = [
"axum-core",
"axum-macros",
"bytes",
"form_urlencoded",
"futures-util",
@@ -154,6 +166,19 @@ dependencies = [
"tracing",
]
[[package]]
name = "axum-cookie"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd42d7564a7d36703869e6191aa2dc29d72c9158501035da83ad934eca2e7ca1"
dependencies = [
"axum-core",
"cookie-rs",
"http",
"tower-layer",
"tower-service",
]
[[package]]
name = "axum-core"
version = "0.5.2"
@@ -174,6 +199,17 @@ dependencies = [
"tracing",
]
[[package]]
name = "axum-macros"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "backtrace"
version = "0.3.75"
@@ -263,7 +299,7 @@ dependencies = [
"cfg-if",
"critical-section",
"foldhash",
"hashbrown",
"hashbrown 0.15.5",
"portable-atomic",
"portable-atomic-util",
"serde",
@@ -454,6 +490,12 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
name = "cookie-rs"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69deedbff42d34777a2c86794e57629898a686d84efcc28dfa8fbb515c8884ce"
[[package]]
name = "core-foundation"
version = "0.9.4"
@@ -525,6 +567,20 @@ dependencies = [
"typenum",
]
[[package]]
name = "dashmap"
version = "6.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf"
dependencies = [
"cfg-if",
"crossbeam-utils",
"hashbrown 0.14.5",
"lock_api",
"once_cell",
"parking_lot_core",
]
[[package]]
name = "deprecate-until"
version = "0.1.1"
@@ -941,6 +997,12 @@ dependencies = [
"byteorder",
]
[[package]]
name = "hashbrown"
version = "0.14.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
[[package]]
name = "hashbrown"
version = "0.15.5"
@@ -959,7 +1021,7 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1"
dependencies = [
"hashbrown",
"hashbrown 0.15.5",
]
[[package]]
@@ -1278,7 +1340,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92119844f513ffa41556430369ab02c295a3578af21cf945caa3e9e0c2481ac3"
dependencies = [
"equivalent",
"hashbrown",
"hashbrown 0.15.5",
]
[[package]]
@@ -1339,6 +1401,19 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "jsonwebtoken"
version = "9.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde"
dependencies = [
"base64",
"js-sys",
"ring",
"serde",
"serde_json",
]
[[package]]
name = "lazy_static"
version = "1.5.0"
@@ -1736,10 +1811,13 @@ version = "0.1.1"
name = "pacman-server"
version = "0.1.1"
dependencies = [
"async-trait",
"axum",
"chrono",
"axum-cookie",
"dashmap",
"dotenvy",
"figment",
"jsonwebtoken",
"oauth2",
"reqwest",
"serde",
@@ -2630,7 +2708,7 @@ dependencies = [
"futures-intrusive",
"futures-io",
"futures-util",
"hashbrown",
"hashbrown 0.15.5",
"hashlink",
"indexmap",
"log",