Artículos con :
Cerrar
Changelog
Cerrar
Pruébelo en la nube
Centro de ayuda
integración

About the ONLYOFFICE and HumHub integration

ONLYOFFICE offers an official connector to integrate ONLYOFFICE Docs with HumHub and edit office documents within the social network. You can download the ONLYOFFICE connector from the official Humhub Marketplace or the ONLYOFFICE GitHub page.

To learn more about how the ONLYOFFICE connector for HumHub works, please visit our API documentation.

Main features

  • Creating, editing, and viewing text documents, spreadsheets, and presentations.
  • Co-editing documents in real-time: two co-editing modes (Fast and Strict), the Track Changes mode, comments, and the built-in chat.
  • JWT support to secure your traffic so that no one can have access to your documents with the exception of the users with proper rights.

Supported formats

  • For creating, editing, and viewing: DOCX, PPTX, XLSX
  • For conversion to Office Open XML: ODT, ODS, ODP, DOC, XLS, PPT, TXT, CSV
  • For viewing only: PDF

What's new in version 2.2.2

Fixed

  • JWT support

The full change log is available here.

Connecting ONLYOFFICE Docs to HumHub

Requirements

  • ONLYOFFICE Docs (Document Server) 5.9.4 or later

    You need an instance of ONLYOFFICE Docs that is resolvable and connectable both from HumHub and any end clients. It must be able to POST to HumHub directly.

    Please refer to the official documentation page to learn more about installing ONLYOFFICE Docs.

    You can also use ONLYOFFICE Docs Cloud (SaaS version).

  • HumHub 1.3 and later
  • ONLYOFFICE connector 2.2.2 for HumHub

Installing the ONLYOFFICE connector for HumHub

You can download the latest connector version from the official Humhub Marketplace and configure it. To do it, please follow these steps:

  • Log into your Humhub instance as an administrator.
  • Click the profile drop-down box and choose the Administration option. The User administration screen will load.
  • Click the Modules section on the left-hand side of the page.
  • Enter the Browse online section and locate the ONLYOFFICE connector via search. Results will include the versions that are compatible with your Humhub instance
  • Click the Install button to download and install the ONLYOFFICE module.
  • Once the module is installed, click the Enable button.
    ONLYOFFICE_install ONLYOFFICE_install

Configuring the ONLYOFFICE connector for HumHub

  1. Go to Administration -> Modules -> Installed.
  2. Find the ONLYOFFICE Connector for HumHub module.
  3. Click the Configure button.
  4. Specify the following parameters:
    • Hostname - specify the URL address where the Document Editing Service is installed (ONLYOFFICE Docs is installed on port 80 by default).
      ImportantThe address of ONLYOFFICE Docs must be accessible from HumHub, as well as the address of HumHub must be accessible from ONLYOFFICE Docs.
    • JWT Secret - specify the secret used to sign the data.
      Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to enable it on the HumHub side as well: find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings. For more details, see the Enabling JWT for the ONLYOFFICE and HumHub integration section of this article.
  5. ONLYOFFICE Docs address for internal requests from the server - specify the address that is used to access Document Editing Service from HumHub.
  6. Server address for internal requests from ONLYOFFICE Docs - specify the address that is used to access HumHub from Document Editing Service.
Configure_menu Configure_menu

After configuring the integration application, click the Submit button to save the changes.

Enabling JWT for the ONLYOFFICE and HumHub integration

To protect documents from unauthorized access, ONLYOFFICE editors use the JSON Web Token (JWT). The token is added in the configuration when the Document Editor is initialized and during the exchange of commands between inner ONLYOFFICE Docs services. The secret key is used to sign the JSON web token and validate the token upon the request to ONLYOFFICE Docs.

Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.

Step 1: Find your secret key in the ONLYOFFICE Docs configuration file

  1. Open the local.json file with any available text editor.
    • For Linux - /etc/onlyoffice/documentserver/local.json
    • For Windows - %ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json
    • For Docker – enter the ONLYOFFICE Docs container using the docker exec -it <containerID> bash command and open /etc/onlyoffice/documentserver/local.json

      Alternatively, you can use the following command to find the default secret key without opening local.json:

      sudo docker exec <containerID> /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'

    The local.json file should look like this:

    {
      "services": {
        "CoAuthoring": {
          "token": {
            "enable": {
              "request": {
                "inbox": true,
                "outbox": true
              },
              "browser": true
            }
          },
          "secret": {
            "inbox": {
              "string": "yoursecret"
            },
            "outbox": {
              "string": "yoursecret"
            },
            "session": {
              "string": "yoursecret"
            }
          }
        }
      }
    }
    
  2. The true value is specified in three sections. It means that token validation is enabled.
    • services.CoAuthoring.token.enable.browser
    • services.CoAuthoring.token.enable.request.inbox
    • services.CoAuthoring.token.enable.request.outbox
  3. The automatically generated secret key is specified in three sections. You can replace the default secret value with your own secret key. The secret key must be the same in three sections.
    • services.CoAuthoring.secret.inbox.string
    • services.CoAuthoring.secret.outbox.string
    • services.CoAuthoring.secret.session.string
  4. If you make changes, save them and restart the services for the config changes to take effect.
    supervisorctl restart all

Step2: Specify the same secret key in the connector settings

In the connector settings, specify the same secret in the Secret key field and save the settings.

Start using ONLYOFFICE Docs within HumHub

To create a document:

  1. Open the Files tab.
  2. Click the Add file(s) button.
  3. Click the Create document option.
    ONLYOFFICE_create1 ONLYOFFICE_create1
  4. In the opened window, choose the file type: Document, Spreadsheet or Presentation.
    ONLYOFFICE_create2 ONLYOFFICE_create2
  5. Specify the file name.
  6. Select the Open the new document in the next step checkbox to start working with the document.
  7. Click the Save button.
    ONLYOFFICE_create3 ONLYOFFICE_create3

To view/edit a document:

  1. Open the Files tab.
  2. Click the needed file.
  3. In the opened window, click the Edit document button.
    ONLYOFFICE_editview ONLYOFFICE_editview
Download Best editors on your website Let your site users view, edit and collaborate
on all types of text, spreadsheet and presentation files
También le podría gustar:
Cerrar