Add the alwaysInheritAuthentication option#451
Add the alwaysInheritAuthentication option#451AndrewGuenther wants to merge 1 commit intopostmanlabs:developfrom
Conversation
This option forces all requests to inherit auth from the top of the collection. This is really useful when all requests should be using the same authentication. If authentication is called out on each request in the Postman app, they will not inherit the options set on the collection, like the token, and must all be set manually. By allowing all requests to simply inherit from the collection, the token can be set once at the top of the collection and all requests will use it automatically. Fixes postmanlabs#271
|
@VShingala would appreciate some eyes on this |
|
@SahilChoudhary22 can I get a review on this? |
|
|
@AndrewGuenther Sure, planning to review this before releasing the next version 👍 |
|
Hey @SahilChoudhary22 , any update on this? |
|
Would be really great to have this! |
| // handling authentication here (for http type only) | ||
| authHelper = this.getAuthHelper(openapi, operation.security); | ||
| if (options.alwaysInheritAuthentication) { | ||
| authHelper = this.getAuthHelper(openapi, openapi.security); |
There was a problem hiding this comment.
@AndrewGuenther wanted some clarity on why we're setting the value of authHelper here
|
@AndrewGuenther Thanks for your contributions to the module. After reviewing the pull request, I noticed an area where I could use some additional clarity. I've left a comment on that line. That being said, since the PR is now outdated and now the |
|
Hey @SahilChoudhary22, thanks for reviewing this PR. You mentioned that you would be raising another pull request that would supersede this one. Has there been any progress on that front? |
This option forces all requests to inherit auth from the top of the
collection. This is really useful when all requests should be using the
same authentication. If authentication is called out on each request in
the Postman app, they will not inherit the options set on the
collection, like the token, and must all be set manually. By allowing
all requests to simply inherit from the collection, the token can be set
once at the top of the collection and all requests will use it
automatically.
Fixes #271