loginUsingUser method

Future<ApiReturn> loginUsingUser({
  1. required User user,
})

Logs in a user via the API using a User object.

This method logs in the user by extracting the login credentials from the provided User object and delegating to the login method.

  • user: The User object containing the login identifier and hashed password.

Returns an ApiReturn object with the result of the login request.

Implementation

Future<ApiReturn> loginUsingUser({
  required User user,
}) async {
  String userName = user.userName;
  String hashedPassword = user.hashedPassword ?? "";
  return login(userName: userName, hashedPassword: hashedPassword);
}