swagger-api / swagger-api/swagger-ui

Unable to pass a custom value in the header

Open
#7,051 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: support
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

In case of Oauth2 security type, there is one custom generated value(CSRF Token) that needs to be passed in order to execute the service for our flow to execute. But we are not able to pass the value if it is not present in header, cookie or query string. Isn't there any way to pass a String type of input in request header?

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

No file or test is named. Start by locating Swagger UI's OAuth2 request-building and authorization flow, then determine how a user-supplied string could reach request headers when it is not defined as a header, cookie, or query parameter. Done means the CSRF token can be supplied for this flow and the behavior is covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.