Passing OE2 auth token to Stone Webviewer

I have searched the forum but could not find our exact problem.

We are trying to host orthanc as an Image viewing Service, that can be opened with a link from an external webpage (images are tagged according to some metric, users can then open a share link to view only images tagged with a specifc tag).

We access it using a link like http://orthanc-url/ui/app/?token=our-jwt-token.
We have been using this thread as a guideline and have adjusted the code in there to our needs.
Opening the OE2 with the above link does exactly what we need.
Opening the Stonewebviewer for a study shown in OE2 does not work. Manually attaching the token for OE2 to the Stonewebviewer link works though.

Our question is: how can we make sure the token used as GET parameter to open OE2 is also attached to the Stonewebviewer link? We have played around with custom buttons but did not find a template variable that holds the token value.

Thanks in advance
Many greetings from Hamburg, Germany

Hi @sschuettler

I have added the feature request to our TODO.

However, note that OE2 auth tokens need to be refreshed at regular interval and neither OE2 nor Stone will refresh the OE2 auth token that you pass in the url.

Best regards,

Alain.

Hi @sschuettler

I have implemented a new advanced option to enable this behavior (commit).

You’ll have to add this configuration:

"OrthancExplorer2": {
  "AdvancedOptions": {
    "InstantLinksReuseTokenFromUri": "token"
  }
...

This should be available by tomorrow in the mainline binaries. Would be nice if you could give it a try …

Alain.

 

 


This software is free for you, but not free to create. If it’s useful to you, please consider supporting its development with a donation.

Hi @alainmazy ,

thank you so much for the quick implementation.
I have a docker compose file ready and will test either tomorrow or on monday.

Regarding the token refresh: This is not a problem for us. We can use fairly long expiration times / it is ok if the user has to reopen the viewer.

Cheers
Sam

Works exactly as desired (I had to check which other options trigger the logical branch to reach the token passthrough, but that was a quick thing)
It is now being used as a key component of research infrastructure at our site.

Thank you so much.
Sam

1 Like

Hello,

This is wonderful to hear that the Stone Web viewer is supporting your team’s research! It’s always encouraging for us to see it being used in academic work.

If you happen to reference the tools that contributed to your workflow, acknowledgment of Orthanc or the Stone Web viewer in your publications would be greatly appreciated. Such recognition plays an important role in helping us sustain and further develop the Orthanc ecosystem over time.

Kind Regards,
Sébastien-