Skip to content
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

Ensure only 1 authentication method is used during /token access in o… #99

Merged
merged 5 commits into from Jun 10, 2015

Fix typo, otherwize -> otherwise

  • Loading branch information
ldesplat committed Jun 8, 2015
commit c45b26d72544f455edb240d796e5f6f4a885f920
@@ -38,7 +38,7 @@ internals.schema = Joi.object({
protocol: Joi.string().valid('oauth', 'oauth2'),
temporary: Joi.string().when('protocol', { is: 'oauth', then: Joi.required(), otherwise: Joi.forbidden() }),
auth: Joi.string().required(),
authMethod: Joi.string().valid('basic', 'param').when('protocol', { is: 'oauth2', then: Joi.required(), otherwize: Joi.forbidden() }),
authMethod: Joi.string().valid('basic', 'param').when('protocol', { is: 'oauth2', then: Joi.required(), otherwise: Joi.forbidden() }),

This comment has been minimized.

Copy link
@hueniverse

hueniverse Jun 9, 2015

Member

I would implement this as a boolean since there are only two ways to authenticate. I would make the default using the header because that's the proper way to do it and allow for a params override.

token: Joi.string().required(),
headers: Joi.object(),
profile: Joi.func(),
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.