-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add the alwaysInheritAuthentication option #451
base: develop
Are you sure you want to change the base?
Add the alwaysInheritAuthentication option #451
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! |
@@ -2321,7 +2321,12 @@ module.exports = { | |||
} | |||
|
|||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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