Skip to content

Conversation

@DanLipsitt
Copy link

Tests and implementation for standalone http bearer token auth.

Although OAuth2 supports bearer tokens, they are sometimes used without OAuth as a kind of API key. This is what I mean by "standalone." Although it isn't best practice or what is intended by the spec, it doesn't seem uncommon to (mis)use bearer tokens this way. I am dealing with an API that does this, so here is an implementation for Lapidary. It doesn't appear to be explicitly part of httpx or httpx_auth, so I did it as a special case of ApiKeyAuth.

@rafalkrupinski
Copy link
Contributor

Thank you for the contribution.

Yeah, OAS has many funny corner cases which are best handled case-by-case. Wasn't sure if it made sense to have both bearer and oauth2, and I didn't need it, so I left it out.

I'm working on some changes to the core lapidary RN, then I'll review this one.

Cheers

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 this pull request may close these issues.

2 participants