public function getAltAuthenticator()
    {
        if ($this->handlesAlternateAuth()) {
            $authenticator = new AlternateAuth(
                array_get($this->config, 'alt_auth_db_service_id'),
                array_get($this->config, 'alt_auth_table'),
                array_get($this->config, 'alt_auth_username_field'),
                array_get($this->config, 'alt_auth_password_field'),
                array_get($this->config, 'alt_auth_email_field')
            );
            $authenticator->setOtherFields(array_get($this->config, 'alt_auth_other_fields'));
            $authenticator->setFilters(array_get($this->config, 'alt_auth_filter'));

            return $authenticator;
        } else {
            throw new InternalServerErrorException('No alternate authentication is configured for this service.');
        }
    }