protected static function transform_token($record) {
        $notexportedstr = get_string('privacy:request:notexportedsecurity', 'core_webservice');
        return [
            'external_service' => $record->externalservicename,
            'token' => $notexportedstr,
            'private_token' => $record->privatetoken ? $notexportedstr : null,
            'ip_restriction' => $record->iprestriction,
            'valid_until' => $record->validuntil ? transform::datetime($record->validuntil) : null,
            'created_on' => transform::datetime($record->timecreated),
            'last_access' => $record->lastaccess ? transform::datetime($record->lastaccess) : null,
        ];
    }