swagger-api / swagger-api/swagger-codegen

[C#] Cannot set tokenURL, Scope, clientId, or ClientSecret for OATH2

Open
#10,030 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Description

With OATH2 the code generator requires the OATH token to be set manually and does not provide any functions that can retrieve the token from the tokenURL. The code generation needs to be enhanced so that it does not require a Access_Token but instead requires the OATH Secret, id, and scope. When the client has an invalid or expired key the oath token should be refreshed internally by the generated code.

Swagger-codegen version

3.x

Swagger declaration file content or url

https://app.swaggerhub.com/apis/Pointe-Pest-Control/paylocity/2-oas3

Command line used for generation

Visual Studio Code Generation (C#) .netcore

Steps to reproduce
Related issues/PRs
Suggest a fix/enhancement

Support OATH 2 internal so that it is not required to write additional boiler plate to handle obtaining the oath2 access token.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the linked SwaggerHub OAS3 declaration as the reproduction input and inspect the Visual Studio Code Generation (C#) .NET Core path first. Compare the generated handling of access tokens with the requested tokenURL, client ID, client secret, and scope inputs; done means generated code can obtain and refresh OAuth2 tokens without caller-written boilerplate.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, openapi
Domain
api, authentication, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.