Skip to content

Master 1930 jersey2#2478

Closed
davidwcarlson wants to merge 11 commits into
OpenAPITools:masterfrom
davidwcarlson:master_1930_jersey2
Closed

Master 1930 jersey2#2478
davidwcarlson wants to merge 11 commits into
OpenAPITools:masterfrom
davidwcarlson:master_1930_jersey2

Conversation

@davidwcarlson
Copy link
Copy Markdown
Contributor

PR checklist

  • [X ] Read the contribution guidelines.
  • [X ] Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • [X ] Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • [X ] Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

I think in the merging of #1930, the new setBearerToken(String) method was erroneously included inside the conditional rendering of the OAuth setAccessToken(String) method.

davidwcarlson and others added 11 commits January 24, 2019 11:41
See OpenAPITools#457
Also OpenAPITools#1446 for typescript, OpenAPITools#1577 for python

Specs defined as follows currently generate BasicAuth and send an "Authorization: Basic [base64Encode(username + ":" + password)]" header
    components:
      securitySchemes:
        bearer:
          type: http
          scheme: bearer

This change will generate code which uses a new HttpBearerAuth class, which will send a "Authorization: [scheme] [accessToken]" header.
This change is slightly larger and more impactful than simply using OAuth for bearerBearer, but it allows for scheme values other than bearer.

This fix was enabled by the recent commit of OpenAPITools@80ca67c

This PR is an alternative to OpenAPITools#1972
@davidwcarlson davidwcarlson deleted the master_1930_jersey2 branch March 22, 2019 08:24
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.

2 participants