Need dedicated support? Click here
Need dedicated support?
Click here

How to config auth when setup document editor

hi, onlyoffice community, I am trying to integrate xwiki with onlyoffice doc.

config = {
        document: {
            fileType: 'docx',
            key: 'empty.docx',
            title: 'empty.docx',
            url: 'http://admin:#Fgglgy0223@'
        editorConfig: {
            callbackUrl: '${DOC_NAME}&useraddress=',
            customization: {
                autosave: false,
                chat: false,
                comments: false,
                forcesave: true
            lang: 'zh',
            location: 'cn'
        height: '600px',
        documentType: 'word'
    var docEditor = new DocsAPI.DocEditor('onlyoffice-container', config)

the problem is I want the document editing service download attachment file directly from xwiki, but the attachment url need http basic auth, I tried embed username and password in url, but faild, I also find there is no option to specify auth headers.

please help

Hello Fanguogang.

Please note that we didn’t create XWiki connector:

It was a developer team from XWiki.

As for auth access, please note that editors must have anonymous access to download files from the storage. Otherwise, please use JWT.

I find cookie is copied, so my problem is fixed, thanks.

1 Like

@Alexandre need some detail about JWT token

My xwiki using openid-connect to authenticate user, so there is a JWT token in user’s session.
Can we use that token ?

Hello @Fanguogang
The main point is that Document server should be able to download a file without any authorization. If your usage scheme involves using authorization parameters (login to a storage to get a file), the Document Server will not be able to get a file.
If I misunderstood your request, please clarify it.