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

authorization // character limit #15

Closed
cf212 opened this issue Sep 23, 2019 · 5 comments
Closed

authorization // character limit #15

cf212 opened this issue Sep 23, 2019 · 5 comments

Comments

@cf212
Copy link

cf212 commented Sep 23, 2019

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

miku added a commit that referenced this issue Sep 23, 2019
@miku
Copy link
Owner

miku commented Sep 23, 2019

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?

@cf212
Copy link
Author

cf212 commented Sep 23, 2019

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

@miku
Copy link
Owner

miku commented Sep 23, 2019

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.

@cf212
Copy link
Author

cf212 commented Sep 24, 2019

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

@cf212 cf212 closed this as completed Sep 24, 2019
@miku
Copy link
Owner

miku commented Sep 24, 2019

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.

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

No branches or pull requests

2 participants