Skip to content

Config option: (do not) search default token keys - #1416

Merged
bajtos merged 2 commits into
masterfrom
feature/searchDefaultTokenKeys
Jul 9, 2015
Merged

bajtos merged 2 commits into
masterfrom
feature/searchDefaultTokenKeys

Conversation

@bajtos

@bajtos bajtos commented May 29, 2015

Copy link
Copy Markdown
Member

A follow-up for abandoned #1347.

Add a new option searchDefaultTokenKeys to the token middleware. Users can set this option to false to prevent AccessToken from checking default places like "access_token" in the request query string.

Connect to #1326

/to @ritch please review
/cc @OwenBrotherwood

@bajtos bajtos added the #review label May 29, 2015
@bajtos
bajtos force-pushed the feature/searchDefaultTokenKeys branch from 8e778b0 to e83773d Compare May 29, 2015 09:33
@OwenBrotherwood

Copy link
Copy Markdown
Contributor

@bajtos Some Javadoc may be needed

* @property {Boolean} [searchDefaultTokenKeys] Use the default search locations for Token in request

OwenBrotherwood and others added 2 commits May 29, 2015 12:06
Set this option to false to prevent AccessToken from checking default
places like "access_token" in query.
@bajtos
bajtos force-pushed the feature/searchDefaultTokenKeys branch from e83773d to 986132d Compare May 29, 2015 10:06
@bajtos

bajtos commented May 29, 2015

Copy link
Copy Markdown
Member Author

Some Javadoc may be needed

* @property {Boolean} [searchDefaultTokenKeys] Use the default search locations for Token in request

@OwenBrotherwood good catch, it should be fixed now in 86ed472

@bajtos

bajtos commented Jul 3, 2015

Copy link
Copy Markdown
Member Author

@ritch I forgot to assign this to you in GH, could you PTAL?

@ritch

ritch commented Jul 3, 2015

Copy link
Copy Markdown
Member

Can you make sure the ci is passing? Otherwise the code LGTM.

@bajtos

bajtos commented Jul 3, 2015

Copy link
Copy Markdown
Member Author

@slnode test please

@bajtos

bajtos commented Jul 3, 2015

Copy link
Copy Markdown
Member Author

Can you make sure the ci is passing? Otherwise the code LGTM.

This looks like a problem with downstream dependencies. LoopBack's master fails on our CI build and passes on Travis. This patch passes on Travis and fails on Jenkins. The error messages are the same AFAICT:

// beforeEach hook - access control - integration /users when called by logged in user
TypeError: Cannot read property 'constructor' of undefined
// afterEach hook - access control - integration /users when called by logged in user
Cannot call method 'destroy' of undefined
TypeError: Cannot call method 'destroy' of undefined

Was there any breaking change in loopback-testing that would explain this problem?

The other test error does not seem to be related to this patch either:

// Change Change.diff(modelName, since, remoteChanges, callback) 
//    should return delta and conflict lists
AssertionError: 4 == 1
    at test/change.test.js:354:16
    at common/models/change.js:445:7

I am proposing to land this PR now and investigate the failing build later.

@ritch Thoughts?

@ritch

ritch commented Jul 8, 2015

Copy link
Copy Markdown
Member

Was there any breaking change in loopback-testing that would explain this problem?

Yes. LoopBack should use loopback-testing@~1.1.0.

@ritch

ritch commented Jul 8, 2015

Copy link
Copy Markdown
Member

I am proposing to land this PR now and investigate the failing build later.

Sounds good.

@ritch ritch assigned bajtos and unassigned ritch Jul 8, 2015
bajtos added a commit that referenced this pull request Jul 9, 2015
Config option: (do not) search default token keys
@bajtos
bajtos merged commit 5ec7fd5 into master Jul 9, 2015
@bajtos
bajtos deleted the feature/searchDefaultTokenKeys branch July 9, 2015 16:03
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.

3 participants