Oauth support seems broken
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- openapi, python
- Domain
- api, authentication
Research direction
Start by generating a client from the supplied OpenAPI YAML and inspect whether the generated client contains OAuth handling; compare this with the manually supplied token path using AuthenticatedClient. Done means the clientCredentials flow is handled by the generated client, or the supported behavior is clearly established.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 2k
- Forks
- 293
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openapi-generators/openapi-python-client
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
openapi-generators/openapi-python-client#1451 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
openapi-generators/openapi-python-client#1435 · 1 comment ·
All issues in openapi-generators/openapi-python-client
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·