14 lines
430 B
TypeScript
14 lines
430 B
TypeScript
import type { AuthSessionDTO } from '../dto/AuthSessionDTO';
|
|
import type { IdentitySessionPort } from '../ports/IdentitySessionPort';
|
|
|
|
export class GetCurrentUserSessionUseCase {
|
|
private readonly sessionPort: IdentitySessionPort;
|
|
|
|
constructor(sessionPort: IdentitySessionPort) {
|
|
this.sessionPort = sessionPort;
|
|
}
|
|
|
|
async execute(): Promise<AuthSessionDTO | null> {
|
|
return this.sessionPort.getCurrentSession();
|
|
}
|
|
} |