Skip to content
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

DM-18667 Add support to display_firefly for obtaining and passing along an authorization token for Firefly #30

Merged
merged 2 commits into from Aug 6, 2019

Conversation

stargaser
Copy link
Contributor

  • retrieve token from Display kwarg if provided; then from ACCESS_TOKEN environment variable
  • pass token to FireflyClient factory methods
  • add a section to the documentation explaining the token= kwarg

@stargaser stargaser requested a review from gpdf April 30, 2019 23:14
@stargaser stargaser force-pushed the tickets/DM-18667 branch 2 times, most recently from 114a5a9 to 49b8c08 Compare July 18, 2019 22:33
@tgoldina
Copy link

tgoldina commented Aug 6, 2019

@xiuqin asked me to help verifying this ticket. I have verified it on JupyterHub in a local environment with display_firefly from your branch, firefly_client 2.2.0 locally installed.

It works as expected.

Below are more details on how I tested it.

I've tested it using unified portal app (which can act as a Firefly and SUIT server). It requires authorization to work.

import lsst.afw.display as afwDisplay
display1 = afwDisplay.Display(url='https://lsst-lsp-int.ncsa.illinois.edu/portal/app', frame=1, backend='firefly')
fc = display1.getClient()
fc.show_table(tbl_id='LSSTTAPSchemas', title='LSST TAP Schemas',
             file_on_server='https://lsst-lsp-int.ncsa.illinois.edu/api/tap/sync?REQUEST=doQuery&LANG=ADQL&QUERY=SELECT+*+FROM+TAP_SCHEMA.schemas',
             options=dict(removable=True, showUnits=False, showFilters=True))

Creating client with https://lsst-lsp-int.ncsa.illinois.edu/portal/app would fail, if not authorized. Also TAP service on lsst-lsp-int requires authorization.

With the default notebook firefly, the show_table above produces '401 Unauthorized error' as expected, because a generic firefly server does not have authorization mechanism set.

@stargaser stargaser requested a review from tgoldina August 6, 2019 19:02
@stargaser stargaser merged commit 7e102bf into master Aug 6, 2019
@stargaser stargaser deleted the tickets/DM-18667 branch August 6, 2019 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants