Skip to content

Adding support for payload authentication validation#438

Merged
hueniverse merged 16 commits into
hapijs:developfrom
geek:feature/hawkpayload
Feb 15, 2013
Merged

Adding support for payload authentication validation#438
hueniverse merged 16 commits into
hapijs:developfrom
geek:feature/hawkpayload

Conversation

@geek
Copy link
Copy Markdown
Member

@geek geek commented Feb 1, 2013

Closes #379

@hueniverse
Copy link
Copy Markdown
Contributor

Need to update pull to merge

@ghost ghost assigned hueniverse Feb 4, 2013
Comment thread lib/auth/index.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to remember which strategy was used in the first round, and use the same one here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to remember the strategy on session and use it when validating the payload.

Comment thread lib/auth/index.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be _strategy.

Comment thread lib/auth/hawk.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call it authenticatePayload

Comment thread lib/route.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't line 79 enough?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It prevents setting the payload = 'optional' and the strategy not supporting payload authentication.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the error to 'Payload authentication requires at least one strategy with payload support'

Comment thread lib/auth/hawk.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to use a callback. Future payload validation might not be sync.

hueniverse pushed a commit that referenced this pull request Feb 15, 2013
Adding support for payload authentication validation
@hueniverse hueniverse merged commit d2f6ef4 into hapijs:develop Feb 15, 2013
jmonster pushed a commit to jmonster/hapi that referenced this pull request Feb 10, 2014
Adding support for payload authentication validation
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.

2 participants