JWT token missing when Version History clicked

Integration questions/issues
Post Reply
aligazi
Posts: 2
Joined: Fri Oct 09, 2020 12:14 pm

JWT token missing when Version History clicked

Post by aligazi » Fri Oct 09, 2020 12:24 pm

Hi.
I am evaluating document server integration edition (docker) with the java example provided in the integration examples section.
I have configured the endpoints and integrated the Java Example with document server.
When JWT security is disabled everything works fine. When i enable JWT, and define the secret key for both Java app and the document server, everything works fine, until i click the version history button under the collaboration tab. When i click the version history, I get the message: "The document security token is not correctly formed.Please contact your Document Server administrator."

Starting docker with en.list file:
JWT_ENABLED=true
JWT_SECRET=1q2w3e4r
JWT_HEADER=Authorization

Docker logs:
nodeJS - checkJwt error: docId = 876819572 name = JsonWebTokenError message = jwt must be provided token = undefined

Am I missing something?
Thanks.

Carl
Posts: 442
Joined: Thu Apr 12, 2018 10:00 am

Re: JWT token missing when Version History clicked

Post by Carl » Mon Oct 12, 2020 7:23 am

Hello aligazi,

Thank you for reporting the issue. The thing is, setHistoryData method https://api.onlyoffice.com/editors/meth ... istoryData must be signed with JWT, but it is not signed in the Java integration example. We will fix it in the future.

aligazi
Posts: 2
Joined: Fri Oct 09, 2020 12:14 pm

Re: JWT token missing when Version History clicked

Post by aligazi » Mon Oct 12, 2020 7:30 am

Hello Carl,
Thanks for the response.
So it's a problem about java example? Is there a way i can fix it in my code?

Carl
Posts: 442
Joined: Thu Apr 12, 2018 10:00 am

Re: JWT token missing when Version History clicked

Post by Carl » Mon Oct 12, 2020 7:48 am

Hello aligazi,
So it's a problem about java example? Is there a way i can fix it in my code?
Yes, you can add JWT to setHistoryData in your code:
https://api.onlyoffice.com/editors/sign ... istoryData

Post Reply