LoginUserUseCase

class LoginUserUseCase(userRepository: UserRepository, credentialsRepository: UserCredentialsRepository, passwordHasher: PasswordHasher, timeProvider: TimeProvider) : LoginUser

Authenticates a user using either email or username and validates the provided password.

The use case coordinates user lookup, credential retrieval, lockout checks, and password verification while keeping transport concerns outside the application layer.

Constructors

Link copied to clipboard
constructor(userRepository: UserRepository, credentialsRepository: UserCredentialsRepository, passwordHasher: PasswordHasher, timeProvider: TimeProvider)

Functions

Link copied to clipboard
open override fun execute(email: String, username: String, password: String): LoginUser.Companion.LoginResult

Authenticates a user based on the provided email and password.