Add config.toml support for OIDC and server configuration

- Add toml crate dependency for TOML file parsing
- Create config module with Config struct to deserialize config.toml
- Support OIDC URLs (auth_url, token_url, redirect_url), credentials (client_id, client_secret)
- Make server host/port, database URL, and session secret configurable
- Create config.example.toml with all configuration options documented
- Update main.rs to load config.toml with fallback to environment variables
- Maintain backward compatibility with environment variable configuration
This commit is contained in:
Lukas Wölfer
2026-04-10 23:45:12 +02:00
parent d27022b26a
commit b6f03f9efb
7 changed files with 194 additions and 27 deletions

View File

@@ -18,8 +18,8 @@ async fn make_app() -> axum::Router {
Some(TokenUrl::new("http://localhost/token".into()).unwrap()),
);
let state = AppState { pool, oidc_client };
create_app(state, b"01234567890123456789012345678901".to_vec())
let state = AppState { pool: pool.clone(), oidc_client };
create_app(state, b"01234567890123456789012345678901".to_vec(), pool).await
}
#[tokio::test]