forked from jappel/leistungsbilanz-ts
Harden user management integration
This commit is contained in:
parent
73579d1e79
commit
847f4e9493
18 changed files with 394 additions and 111 deletions
|
|
@ -3,9 +3,14 @@ import { LoginThrottle } from "../auth/login-throttle.js";
|
|||
import { SessionStore } from "../auth/sessions.js";
|
||||
import { UserService } from "../../domain/services/user.service.js";
|
||||
import { userRepository } from "./application-repositories.js";
|
||||
import { hashPassword, verifyPassword } from "../auth/password.js";
|
||||
|
||||
export const authConfig = readAuthConfig();
|
||||
export const sessionStore = new SessionStore(authConfig.sessionTtlMs, authConfig.sessionMaxAgeMs);
|
||||
sessionStore.startSweeping();
|
||||
export const loginThrottle = new LoginThrottle();
|
||||
export const userService = new UserService(userRepository, authConfig);
|
||||
export const userService = new UserService(
|
||||
userRepository,
|
||||
{ bootstrap: authConfig.bootstrap },
|
||||
{ hash: hashPassword, verify: verifyPassword }
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue