getUsername() == $key->getUsername(); $password_match = $this->getPassword() == $key->getPassword(); return $username_match && $password_match; } /** * Return auth directive * * @return Directive */ public function getDirective(): Directive { return new Directive('basic', [ 'realm' => $this->getRealm(), 'charset' => 'UTF-8', ]); } }