feat(auth): add signOutUseCase (test red until DI lands)

This commit is contained in:
2026-05-05 00:39:31 +02:00
parent c989df41d5
commit 786f3c3420
2 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import type { Cookie } from "../../entities/cookie";
import { authContainer } from "../../di/container";
import { AUTH_SYMBOLS } from "../../di/symbols";
import type { IAuthenticationService } from "../services/authentication-service.interface";
export async function signOutUseCase(
sessionId: string,
): Promise<{ blankCookie: Cookie }> {
const authService = authContainer.get<IAuthenticationService>(
AUTH_SYMBOLS.IAuthenticationService,
);
return await authService.invalidateSession(sessionId);
}