unity-sds / unity-py

Apache License 2.0
2 stars 4 forks source link

Test STAC Browser using unity-py command to generate a token to input into the form for authentication #77

Closed rtapella closed 3 months ago

rtapella commented 5 months ago
rtapella commented 5 months ago
rtapella commented 4 months ago

s = Unity(UnityEnvironments.TEST) token = s._session.get_auth().get_token()

rtapella commented 4 months ago

Waiting until @wphyojpl gets a STAC Browser working with Cognito on a DAPA endpoint.

rtapella commented 4 months ago

curl "https://dxebrgu0bc9w7.cloudfront.net/am-uds-dapa/collections/urn:nasa:unity:unity:test:SBG-L1B_PRE___1/items/urn:nasa:unity:unity:test:SBG-L1B_PRE___1:SISTER_EMIT_L1B_RDN_20230810T034101_001" --header "Authorization: Bearer ${TOKEN}"

rtapella commented 4 months ago

seems to work for me for the curl operation

GodwinShen commented 4 months ago

@rtapella cool, it works for me as well in the unity-venue-test JupyterHub environment using python requests library and the unity-sds-client inside a python notebook! What is left to do on this ticket now that we have the token stuff working?

rtapella commented 4 months ago

This is waiting on the STAC browser web-GUI to be set up (https://github.com/unity-sds/unity-data-services/issues/328 ) and then try this same approach in the GUI instead of the CLI. The CLI shows that the token stuff is working and the endpoint is functional, but we’ll need to test the wiring to the GUI.

rtapella commented 3 months ago

this is working now.. some oddities but it basically works!