miku / metha

Command line OAI-PMH harvester and client with built-in cache.

Home Page:https://lab.ub.uni-leipzig.de/metha/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

authorization // character limit

cf212 opened this issue · comments

commented

Hi, I am trying to use metha to access an endpoint url that requires an authentication token in the header. If I add the header to the endpoint url it exceeds the 255 character limit. It would be nice if metha would allow for either

  1. custom headers
  2. custom directories (to solved the 255 character limit issue)
    so that I could somehow include my authentication token and access this repository.

thanks

Thanks for the bug report, the 255 char limit is quite annoying, I am aware of that - it was a simple solution that worked 99% of the time.

Anyway, the extra header HTTP seems to be the quicker fix for the moment. I added a preliminary implementation in 0.1.45 - maybe you can give it a try?

$ metha-sync -H "Authorization: Basic YWxhZGRpbjp" https://oai.hidden.org/

May I ask, in which context you are using metha?

commented

Thanks for the quick response!
I am using metha to get updated metadata from Crossref.org. They provide free access to ListSets and ListIdentifiers but require a paid subscription to access full metadata records.
The authorization header is in the format: Crossref-Plus-API-Token: Bearer <token>, so I tried
$ metha-sync -H "Crossref-Plus-API-Token: Bearer <really long token>" http://oai.crossref.org/oai
and got the error FATA[0000] extra headers notation is "Some-Key: Some-Value"

edit: I've played around a bit and even when I use the sample in the documentation: -H "Token: 123" I get the same error

I am using metha to get updated metadata from Crossref.org.

Interesting, I wrote a bit about incremental Crossref harvest in an issue comment. Happy to discuss details.

Thanks for testing it. I hopefully fixed the issue in 0.1.46.

commented

Fixed! Thank you, and thanks for the link about Crossref harvesting

Fixed! Thank you, and thanks for the link about Crossref harvesting

Thanks for testing. Glad, the workaround was simple. The filename limitation will hopefully be gone after the next overhaul.