WP-01: authentication, user management and application shell
Argon2id password hashing, JWT access tokens with rotating HttpOnly refresh cookies and reuse detection, login rate limiting, auth audit log, bootstrap admin, admin-only user CRUD and password reset, OpenAPI spec. Vue login page, auth store with automatic token refresh, route guards, sidebar shell with toasts and placeholder pages, user management page. All tests green: 40 backend, 12 Vitest, 4 Playwright. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@ -14,5 +14,22 @@ pub fn test_config() -> Config {
|
||||
}
|
||||
|
||||
pub async fn build_test_app() -> Router {
|
||||
build_app(AppState { cfg: test_config() })
|
||||
build_test_app_with(test_config()).await
|
||||
}
|
||||
|
||||
pub async fn build_test_app_with_admin(email: &str, password: &str) -> Router {
|
||||
let cfg = Config {
|
||||
bootstrap_admin: Some((email.into(), password.into())),
|
||||
..test_config()
|
||||
};
|
||||
build_test_app_with(cfg).await
|
||||
}
|
||||
|
||||
async fn build_test_app_with(cfg: Config) -> Router {
|
||||
let pool = infrastructure::connect(&cfg.database_url)
|
||||
.await
|
||||
.expect("db");
|
||||
let state = AppState::new(cfg, pool);
|
||||
state.bootstrap().await.expect("bootstrap");
|
||||
build_app(state)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user