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

[ASP.Net Core] General support to add scopes for bearer authentication #1984

Merged
merged 11 commits into from Jun 4, 2019

Conversation

@MBcom
Copy link
Contributor

MBcom commented Jan 25, 2019

implemented authorize workflow in aspnet core too

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 and ./bin/security/{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

this PR solves #1983 and adds role/scope based security support to each route

MBcom added 3 commits Jan 27, 2019
implemented authorize workflow in aspnet core too
@MBcom MBcom force-pushed the MBcom:aspnetcore_bearer_scopes branch from 0137e5d to f837cdc Jan 27, 2019
@wing328

This comment has been minimized.

Copy link
Member

wing328 commented Feb 18, 2019

CI (appveyor) reports the following errors:

  Exception: null
	at org.openapitools.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:1079)
	at org.openapitools.codegen.DefaultGenerator.processPaths(DefaultGenerator.java:941)
	at org.openapitools.codegen.DefaultGenerator.generateApis(DefaultGenerator.java:512)
	at org.openapitools.codegen.DefaultGenerator.generate(DefaultGenerator.java:896)
	at org.openapitools.codegen.cmd.Generate.run(Generate.java:354)
	at org.openapitools.codegen.OpenAPIGenerator.main(OpenAPIGenerator.java:61)
Caused by: java.lang.NullPointerException
	at org.openapitools.codegen.DefaultGenerator.processOperation(DefaultGenerator.java:1033)
	... 5 more
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2g; support was removed in 8.0

Looks like we need better null check to handle the NPE.

Let me know if you need help on that.

MBcom added 5 commits Feb 20, 2019
@wing328 wing328 added this to the 4.0.0 milestone Mar 12, 2019
@wing328 wing328 modified the milestones: 4.0.0, 4.0.1 May 13, 2019
@wing328 wing328 modified the milestones: 4.0.1, 4.0.2 May 31, 2019
@wing328

This comment has been minimized.

Copy link
Member

wing328 commented Jun 3, 2019

Please resolve the merge conflicts if you want this PR to get merged.

MBcom added 2 commits Jun 4, 2019
@MBcom

This comment has been minimized.

Copy link
Contributor Author

MBcom commented Jun 4, 2019

merge conflicts resolved

@wing328 wing328 merged commit dcf3f42 into OpenAPITools:master Jun 4, 2019
4 checks passed
4 checks passed
Shippable Run 8467 status is SUCCESS.
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@wing328 wing328 changed the title general support to add scopes for bearer auth too General support to add scopes for bearer authentication Jun 4, 2019
jimschubert added a commit to jimschubert/openapi-generator that referenced this pull request Jun 6, 2019
* master:
  [Java][okhttp-gson] Update dependencies (OpenAPITools#3103)
  Link query parameter to model object (OpenAPITools#2710)
  scala-play-server: fix enum names for reserved words (OpenAPITools#3080)
  Add @Sunn to openapi generator core team (OpenAPITools#3105)
  fix NPE in go generator (OpenAPITools#3104)
  scala-play-server: fix API doc url (OpenAPITools#3096)
  [maven-plugin] fix strictSpec parameter without alias (OpenAPITools#3095)
  Ruby: Avoid double escaping path items (OpenAPITools#3093)
  [Golang][client] Allow generating go client code as a submodule. (OpenAPITools#3012)
  [CI] Test maven plugin in Travis, move jobs from Shippable to Circle CI (OpenAPITools#3087)
  general support to add scopes for bearer auth too (OpenAPITools#1984)
  feat(java-jersey2): Making response headers case-insensitive (OpenAPITools#3072)
  [KOTLIN Spring] fix generation with modelNamePrefix/Suffix (OpenAPITools#3038)
  Mark nodejs-server as deprecated (OpenAPITools#3083)
  Use 4.0.2-SNAPSHOT version in gradle samples (OpenAPITools#3085)
@wing328 wing328 changed the title General support to add scopes for bearer authentication [ASP.Net Core] General support to add scopes for bearer authentication Jun 20, 2019
@wing328

This comment has been minimized.

Copy link
Member

wing328 commented Jun 20, 2019

Thanks again for the PR, which has been included in the v4.0.2 release: https://twitter.com/oas_generator/status/1141610197766426626

richardwhiuk added a commit to Metaswitch/openapi-generator that referenced this pull request Jul 29, 2019
- Filter scopes based on operation

- Partially revert OpenAPITools#1984 to not rely on custom attributes as to whether scopes exist
richardwhiuk added a commit that referenced this pull request Nov 8, 2019
…ency (#3495)

Fix Codegen Operation Scope Consistency

- Filter scopes based on operation

- Partially revert #1984 to not rely on custom attributes as to whether scopes exist

- Fix filtering global authentication schemes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.