public function setAuthenticatorClass($class)
    {
        $this->authenticatorClass = $class;

        /** @var FieldList|null $fields */
        $fields = $this->Fields();
        if (!$fields) {
            return $this;
        }

        $authenticatorField = $fields->dataFieldByName('AuthenticationMethod');
        if ($authenticatorField) {
            $authenticatorField->setValue($class);
        }

        return $this;
    }