server: add OAuth2 authentication routes

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Icacb5359f4d05d53d4c1b60cc2c0f4f66a6a6964
This commit is contained in:
raf 2026-02-07 20:04:19 +03:00
commit a9e9599d5b
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 546 additions and 3 deletions

View file

@ -10,6 +10,7 @@ pub mod health;
pub mod jobsets;
pub mod logs;
pub mod metrics;
pub mod oauth;
pub mod projects;
pub mod search;
pub mod users;
@ -156,6 +157,8 @@ pub fn router(state: AppState, config: &ServerConfig) -> Router {
.merge(metrics::router())
// Webhooks use their own HMAC auth, outside the API key gate
.merge(webhooks::router())
// OAuth routes use their own auth mechanism
.merge(oauth::router())
.layer(TraceLayer::new_for_http())
.layer(cors_layer)
.layer(RequestBodyLimitLayer::new(config.max_body_size))