OpenAPITools / OpenAPITools/openapi-generator

[REQ] support user provided authenticator in api client

Open
#6,023 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

need an authenticator to refresh bearer token every X minutes in api client

Describe the solution you'd like

the typescript client generator already solved this by allowing user to supply a default authenticator. https://github.com/OpenAPITools/openapi-generator/blob/6dc3216f6d8c8566931552a59198c3e13cfaa291/modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache#L43
we probably need to do the same thing to other generators, e.g. java, python,...etc..

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

Start with the referenced modules/openapi-generator/src/main/resources/typescript-node/api-single.mustache template and compare how the Java and Python generators handle authentication. Define the supported user-supplied authenticator behavior and verify that generated clients can refresh bearer tokens at the requested interval across the selected generators.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, python, typescript
Domain
api, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.