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

Oauth support seems broken #1235

Open
bgirschig opened this issue Mar 26, 2025 · 0 comments
Open

Oauth support seems broken #1235

bgirschig opened this issue Mar 26, 2025 · 0 comments

Comments

@bgirschig
Copy link

Describe the bug
I am trying to generate a client for an API with an clientCredentials oauth flow, but the generated client doesn't seem to manage the authentication at all: Searching the client's folder for the keyword oauth yields no results.

I can make it work by generating a token myself and using it in AuthenticatedClient, but I would expect the generated client to be able to handle that.

Is openapi-python-client supposed to generate a client that handles a clientCredentials oauth flow ?

OpenAPI Spec File

openapi: 3.0.3
info:
  title: Test API
  version: v1
paths:
  /test:
    get:
      security:
        - oauth2: []
      responses:
        '200':
          description: ""

components:
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          refreshUrl: https://whatever.com/oauth/token/
          tokenUrl: https://whatever.com/oauth/token/
          scopes: {}

Desktop:

  • OS: Ubuntu 22.04.5
  • Python Version: 3.12.7
  • openapi-python-client version: 0.24.2
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

1 participant