-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add ability to authenticate to a Dataverse server #1
Comments
I'm actually hoping to someday support a better user experience than this. I just asked for help: Shibboleth authentication to a RESTful API from mobile, curl, etc. - http://shibboleth.net/pipermail/users/2015-April/020669.html Also archived here: http://shibboleth.1660669.n2.nabble.com/Shibboleth-authentication-to-a-RESTful-API-from-mobile-curl-etc-td7613455.html |
An interesting development is that we're starting to work on OAuth support at IQSS/dataverse#3338 so I wonder if someday we'll be able to use a similar mechanism to have Android users authenticate to Dataverse using their Google account in order to retrieve their API token. |
This just in: authentication via the Search API may no longer be necessary soon: IQSS/dataverse#3900 (comment) |
Sure enough, now that https://demo.dataverse.org and https://dataverse.harvard.edu are running Dataverse 4.7.1, the Search API on those servers no longer require authentication, which is default now that IQSS/dataverse#3900 shipped as part of Dataverse 4.7.1. In aad276b I updated the code to include the following servers as options:
This Android app hasn't been touched in so long that the demo server had been given a shorter name and Harvard's production URL hadn't been finalized. I'm happy to add more servers to the list as they upgrade to 4.7.1. Pull requests modeled off aad276b are welcome. Custom is still an option, as before. Here's how the app looks now: Main screenSettingsUnfortunately, thumbnails are no longer available, which I noted in 2118949 with a link to IQSS/dataverse#3616 which I had closed until there's demand for the Search API yielding downloadable images. Here's a screenshot of how the app used to look when you could get thumbnails out of the Search API: How the app looked back when the Search API returned thumbnailsNow that the app is working again without authentication, I'm going to go ahead and close this issue. If Dataverse ever supports non-public search via the Search API ( IQSS/dataverse#1299 ) we can open this issue up again and work on it. Right now, the Search API is limited to public (published) data. Again, as of Dataverse 4.7.1, you don't need an API token to use the Search API out of the box. |
As predicted at IQSS/dataverse#1809 (comment) as of IQSS/dataverse@8be10bb the Dataverse for Android app no longer works in its current form because it relies entirely on Dataverse 4.0 APIs that now require authentication:
To bring back the ability to perform searches, navigate to search results, and download files, we should use the new API call to retrieve one's API token: IQSS/dataverse#1818
The app should prompt you for your Dataverse username and password, retrieve your API token for you, and persist it for that server. (The app defaults to using https://apitest.dataverse.org but you can switch between a few known Dataverse servers or can type in the address of a custom server.)
Note that because the Dataverse server has no knowledge of your Shibboleth username and password, it will not be able to confirm them and retrieve your API token. To use the Android app, Shibboleth users will need to retrieve their API token via a normal browser and copy the token into the app. That is to say, being able to manually copy an API token into the app should be supported as well.
The text was updated successfully, but these errors were encountered: