inveniosoftware / invenio-oaiharvester

Invenio module for OAI-PMH metadata harvesting between repositories.
https://invenio-oaiharvester.readthedocs.io
GNU General Public License v2.0
5 stars 17 forks source link

api: support for authentication token #18

Open kaplun opened 8 years ago

kaplun commented 8 years ago

Some OAI-PMH servers authorize clients when provided with access tokens. Would be great if the API can be extended to accept an URL and additional headers which might contain such a token.

kaplun commented 8 years ago

cc: @bittirousku

kaplun commented 8 years ago

This could be actually implemented by extending the OaiHARVEST model to support an authentication token, which would then be passed to Sickle in api.get_from_oai_name() and similar calls, by passing a special auth argument as described in: http://docs.python-requests.org/en/latest/user/advanced/#custom-authentication

kaplun commented 8 years ago

One would need to store in the model some complex object (e.g. a serialized JSON map) that would then passed as such to build the headers of the request.