checkCredential method

bool checkCredential(
  1. APICredential? credential
)

Checks if the passed credential matches this credential's username and password.

Implementation

bool checkCredential(APICredential? credential) {
  if (credential == null) return false;

  if (username != credential.username) return false;

  return !hasPassword || checkPassword(credential.password?.passwordHash);
}