-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get authtoken from viewer URL #453
Comments
Ryan, I don't think it's good to write the authtoken in the URL as the location object is global and the token can be read by any other scripts. I encountered this problem with interactive jobs and I added a temporary access code there. I suggest using the same method: 1. Before visiting the viewer url, do another GET request to obtain a temporary access code; 2. Then put this code in URL of the resource viewer. On Jul 26, 2016, at 12:22 PM, Ryan Bannon <notifications@github.commailto:notifications@github.com> wrote: Assume we have the following viewer URL for a Resource: https://rodan.simssa.ca/resource/uuid/viewer/ When opening in a new tab we cannot set the auth token in the header (javascript doesn't allow this). What we CAN do is add the auth token as a GET parameter. Imagine the URL sent to Rodan now looks like the following: https://rodan.simssa.ca/resource/uuid/viewer/?authtoken= Please do the following: when serving viewer URL requests in Rodan, if the auth token is not in the header, check if 'authtoken' exists as a GET parameter and use that instead. Django currently return a 40x response if the token isn't in the header, so you may have to investigate how to circumvent that behaviour. You are receiving this because you are subscribed to this thread. |
Excellent idea On Jul 26, 2016 2:20 PM, "Ling-Xiao Yang" notifications@github.com wrote:
|
Note that constantly changing access keys caused all kinds of problems with @AFFogarty interactive classifier. |
That was a different issue since he had to keep renewing his token so he On Jul 26, 2016 5:04 PM, "Andrew Hankinson" notifications@github.com
|
Done on Viewer branch. Commit: a7735c1 |
Assume we have the following viewer URL for a Resource:
https://rodan.simssa.ca/resource/uuid/viewer/
When opening in a new tab we cannot set the auth token in the header (javascript doesn't allow this). What we CAN do is add the auth token as a GET parameter. Imagine the URL sent to Rodan now looks like the following:
https://rodan.simssa.ca/resource/uuid/viewer/?authtoken=
Please do the following: when serving viewer URL requests in Rodan, if the auth token is not in the header, check if 'authtoken' exists as a GET parameter and use that instead. Django currently return a 40x response if the token isn't in the header, so you may have to investigate how to circumvent that behaviour.
The text was updated successfully, but these errors were encountered: