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

Support x-tokenName extension in OpenAPI 3.0 specs #1489

Merged
merged 3 commits into from Jan 11, 2020

Conversation

Shados
Copy link
Contributor

@Shados Shados commented Dec 10, 2019

Description

Enables using x-tokenName in OpenAPI 3.0 OAuth security schemes in order to select a different field from the token JSON for use as the bearer token.

Motivation and Context

Fixes swagger-api/swagger-ui#4084.

How Has This Been Tested?

I've added a test case for it that provides both the default access_token and a non-default id_token, and confirms the latter is used.

Types of changes

  • No code changes (changes to documentation, CI, metadata, etc)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
    • Something about my environment doesn't play well with most of the tests, causing failures via timeout, but the new and all existing test/oas3/execute tests pass.

@shockey shockey merged commit 06e69c9 into swagger-api:master Jan 11, 2020
@shockey
Copy link
Contributor

shockey commented Jan 11, 2020

thanks @Shados! 👍

@JacobAtchley
Copy link

@shockey when can we expect a release for this? it appears npm is hasn't been updated yet 😭

@webron
Copy link
Contributor

webron commented Jan 22, 2020

@JacobAtchley https://www.npmjs.com/package/swagger-client/v/3.10.0 :)

@JacobAtchley
Copy link

@webron 🙏 thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support "x-tokenName" as in swagger-ui 2 for choosing another OAuth2.0 token field
4 participants