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

Accept access_token provided via header. #1691

Open
aindlq opened this issue Dec 19, 2024 · 3 comments · May be fixed by #1720
Open

Accept access_token provided via header. #1691

aindlq opened this issue Dec 19, 2024 · 3 comments · May be fixed by #1720

Comments

@aindlq
Copy link

aindlq commented Dec 19, 2024

Something like:

Authorization: Bearer <token>

it would make it more convenient to use with libraries like RDF4J.

@tpluscode
Copy link

tpluscode commented Jan 8, 2025

AFAICT, this will be necessary to support authenticated requests with body. Queries too

@Qup42
Copy link
Member

Qup42 commented Jan 24, 2025

Is there a reason for using Bearer in specific? Basic seems "more correct"1 to me here and also more widely supported2. @aindlq

Footnotes

  1. Bearer originated with OAuth2 but we only have a static password here.

  2. During a very quick research the Basic authentication seemed to be more widely supported in client libraries.

@aindlq
Copy link
Author

aindlq commented Jan 24, 2025

@Qup42 my understanding is that basic auth requires user id, so it is base64(user_id:password). Bearer is used not only with OAuth, de-facto it is a standard way to provide some kind of a token/password, e.g see openai api - https://platform.openai.com/docs/api-reference/authentication or github api - https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28

I'm fine with both, I think you can have some hard-coded username and then use basic auth.

jfyi, one thing to keep in mind when implementing basic auth is the fact that some libraries and tools (like wget) expect a full basic auth challenge-respnose flow.

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

Successfully merging a pull request may close this issue.

3 participants