Skip to content

Auth provider that leaves room for future challenge auth to be implemented #2571

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

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

johanste
Copy link

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

Enable custom authentication mechanisms for the OpenAI client similar to what is supported with the bearer token provider for the AzureOpenAI client.

The auth instance itself is a protocol that takes (target) url, query parameters, headers and cookies as input and returns updated values, which should allow for the vast majority of auth scenarios for most service and api gateways put in front of the service (oauth, header based api keys w. arbitrary header names, cookie based auth, challenge requests).

In order to enable challenge auth, we'd have to plug it in to the request pipeline of the client and respond to 401 responses rather than just retrying the request (passing in the 401 response to the do_auth method of the auth provider).

Additional context & links

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