-
Notifications
You must be signed in to change notification settings - Fork 23
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
Plugin whitelist #650
Plugin whitelist #650
Conversation
Pull Request Test Coverage Report for Build 2199
💛 - Coveralls |
}); | ||
}); | ||
}); | ||
|
||
describe('getWhitelistFromPlugins', function () { | ||
it('returns an array of all the plugin\'s whitelist combined', function () { |
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.
Can we cache the function that's being tested so we don't have to call lib.getWhitelistFromPlugins
in every test case?
describe('getWhitelistFromPlugins', function () {
const fn = lib[this.title];
it('returns an array of all the plugin\'s whitelist combined', function () {
// ...
expect(fn(plugins)).to.eql(['/_test']);
});
});
Do this for every test suite
}); | ||
|
||
describe('skipAuth', function () { | ||
it('sets skipAuth to true if the request url is in the whitelist', function () { |
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.
Same suggestion as before
Closing this since the approach is not what we are interested in at the moment. |
Whitelist to skip plugin auth
Plugins can also be objects now so they can pass metadata to amphora like a routes whitelist.
This allows amphora to know which routes should skip the authentication
TODO
Closes #640