/**
  *
  * Verifies a set of credentials.
  *
  * @param array $input An array of credential data, including any data to
  * bind to the query.
  *
  * @return array An array of login data.
  *
  * @throws Exception\ConnectionFailed when the IMAP connection fails.
  *
  */
 public function login(array $input)
 {
     $this->checkInput($input);
     $username = $input['username'];
     $password = $input['password'];
     $conn = $this->phpfunc->imap_open($this->mailbox, $username, $password, $this->options, $this->retries, $this->params);
     if (!$conn) {
         throw new Exception\ConnectionFailed($this->mailbox);
     }
     $this->phpfunc->imap_close($conn);
     return array($username, array());
 }