Files
trouvetonprofile/src/app/domain/authentification/auth.repository.ts
2025-11-27 16:33:26 +01:00

30 lines
832 B
TypeScript

import { LoginDto } from '@app/domain/authentification/dto/login-dto';
import { Observable } from 'rxjs';
import { User } from '@app/domain/users/user.model';
import { RegisterDto } from '@app/domain/authentification/dto/register-dto';
export interface AuthResponse {
isValid: boolean;
token: string;
record: User;
}
export interface AuthRepository {
login(loginDto: LoginDto): Observable<AuthResponse>;
register(registerDto: RegisterDto): Observable<User>;
logout(): void;
isAuthenticated(): boolean;
isEmailVerified(): boolean;
get(): User | undefined;
sendRequestPasswordReset(email: string): Observable<boolean>;
confirmPasswordReset(
resetToken: string,
newPassword: string,
confirmPassword: string
): Observable<boolean>;
sendVerificationEmail(email: string): Observable<boolean>;
}