Package-level declarations

Types

Link copied to clipboard

Changes the current password Params.currentPassword of the user with the new one provided Params.newPassword. If the user is not logged in it returns an instance of Either.Left containing AppError.Unauthorized

Link copied to clipboard

Deletes the logged in user. If the user is not logged in it returns an instance of Either.Left containing AppError.Unauthorized

Link copied to clipboard
class GetAuthState(userRepository: UserRepository) : UseCase<Unit, AuthState>

Gets the current state of authentication.

Link copied to clipboard

Gets the the logged in user If the user is not logged in it returns an instance of Either.Left containing AppError.Unauthorized

Link copied to clipboard

Logs in the user with the provided Params.credentials

Link copied to clipboard

Logs out the currently logged in user. If no user is currently logged in it succeeds.

Link copied to clipboard
class SignUpUser(validateUserName: ValidateUserName, validateUserEmail: ValidateUserEmail, validateUserPassword: ValidateUserPassword, userRepository: UserRepository) : AsyncFailableUseCase<SignUpUser.Params, AppError, Unit>

Signs up a new user Params.user

Link copied to clipboard

Validates the email of a user

Link copied to clipboard

Validates the name of a user

Link copied to clipboard

Validates the password of a user