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

[BUG] Python Authentication path expecting auth token in oauth2 models #2411

Open
developersteve opened this Issue Mar 14, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@developersteve
Copy link
Contributor

developersteve commented Mar 14, 2019

Bug Report Checklist

  • [ ] Have you provided a full/minimal spec to reproduce the issue?
  • [ ] Have you validated the input using an OpenAPI validator (example)?
  • [ ] What's the version of OpenAPI Generator used? 3.3.4
  • [ ] Have you search for related issues/PRs?
  • [ ] What's the actual output vs expected output? Able to generate a token without needing a token
Description

Generated SDK seems to be requesting a token for a token generating call, only seems to be an issue with python

Example generated SDK

api_instance = API.AuthenticationApi(API.ApiClient(configuration))
openapi-generator version

3.3.4

OpenAPI declaration file content or url

Swagger 2.0 spec

securityDefinitions:
  OAuth2:
    type: oauth2
    flow: application
    tokenUrl: 'example.com'
    scopes:
      LOT_DEVICES_READ: LOT_DEVICES_READ
paths:
  /oauth/token:
      summary: Generate OAuth2 token
      tags:
        - Authentication
      operationId: auth token
      produces:
        - application/json
      consumes:
        - application/x-www-form-urlencoded
      parameters:
        - name: client_id
          in: formData
          required: true
          type: string
          description: ''
        - name: client_secret
          in: formData
          required: true
          type: string
          description: ''
        - name: grant_type
          in: formData
          required: true
          type: string
          default: client_credentials
Steps to reproduce

Generate SDK with the above

Related issues/PRs
Suggest a fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.