swagger-api / swagger-api/swagger-codegen

Question 2-0/authentication : Multiple Authentication Types

Open
#6,644 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

From https://swagger.io/docs/specification/2-0/authentication/#multiple I understand that one can distinguish re AND vs OR in case there are more than one securities for an operation.

However in gen model CodegenOperation we have
public List<CodegenSecurity> authMethods;.

So it is unclear how a generator can deal with different combinations for multiple securities for an operation.

Version 2.2.3

From link above:

security:    # A OR B
  - A
  - B
security:    # A AND B
  - A
    B
security:    # (A AND B) OR (C AND D)
  - A
    B
  - C
    D

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 CodegenOperation.authMethods and the Swagger 2.0 authentication documentation linked in the issue. Determine how generator inputs represent OR and AND security combinations, then define completion as a generator being able to distinguish the documented combinations without ambiguity.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, authentication, backend-api-design
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.