Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

fix BearerStrategy.call _extend leaving out req. fixes #112 #116

Merged
merged 1 commit into from
Jun 10, 2016

Conversation

dhodgin
Copy link

@dhodgin dhodgin commented Jun 10, 2016

Since opts is initialized at the top of the function to either an empty object or the options variable and the code afterwards assumes it will be an object and modifies its properties we can remove the need to extend the opts into an empty object in the BearerStrategy.call and just combine opts with passReqToCallback

util._extend does not accept more than 2 arguments so currently passReqToCallback is dropped and not forced true unless you set it in your config of your own app

see: https://github.com/defunctzombie/node-util/blob/master/util.js#L572

@msftclas
Copy link

Hi @dhodgin, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, MSBOT;

@brandwe brandwe merged commit 9033a28 into AzureAD:master Jun 10, 2016
@dhodgin
Copy link
Author

dhodgin commented Jun 24, 2016

I just realized i had made this PR against master not dev. Will you guys take care of this to include it in dev or do you want me to do something?

@yarandoo
Copy link

yarandoo commented Jul 7, 2016

Hi @dhodgin thanks for investigating this and your fix!
I am new to this repo but it seems your PR fixed the mentioned issue, though documentation seems now outdated and some conditional logic relying in "passReqToCallback" looks like not necessary anymore as this parameter is forced to be always true. Please see #141. I am happy to fix those.

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

Successfully merging this pull request may close these issues.

4 participants