code: public function authenticate(AdapterInterface $adapter = null)
      {
          $event = clone $this->getEvent();
          $event->setName(AuthenticationEvent::EVENT_AUTH);
  
          if (!$adapter) {
              $adapter = $this->getAdapter();
          }
  
          if ($adapter) {
              $event->setAdapter($adapter);
          }
  
          $this->getEventManager()->trigger($event);
  
          return $event->getResult();
      }
docs: Authenticates against the supplied adapter
  
  @param  AdapterInterface $adapter
  @return Result