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

Use server.decorate #107

Merged
merged 4 commits into from Jan 29, 2016
Merged

Use server.decorate #107

merged 4 commits into from Jan 29, 2016

Conversation

@jaw187
Copy link
Contributor

jaw187 commented Jan 19, 2016

Closes #104

Requires bump to Hapi 11 to support passing options to server.decorate

},
"devDependencies": {
"code": "2.x.x",
"hapi": "10.x.x",
"hapi": "11.x.x",

This comment has been minimized.

Copy link
@hueniverse

hueniverse Jan 19, 2016

Member

Why not 12?

@jaw187

This comment has been minimized.

Copy link
Contributor Author

jaw187 commented Jan 21, 2016

@hueniverse Ok to merge?

};

return new cookieAuth();

This comment has been minimized.

Copy link
@hueniverse

hueniverse Jan 21, 2016

Member

Should be CookieAuth


server.ext('onPreAuth', (request, reply) => {

request.cookieAuth.reply = reply;

This comment has been minimized.

Copy link
@hueniverse

hueniverse Jan 21, 2016

Member

I would add a comment that reply is only used for setting and unsetting state, and not for actual replies.

@hueniverse

This comment has been minimized.

Copy link
Member

hueniverse commented Jan 21, 2016

See comments. Otherwise good to go.

@jaw187 jaw187 added this to the 6.0.0 milestone Jan 29, 2016
jaw187 added a commit that referenced this pull request Jan 29, 2016
Use server.decorate
@jaw187 jaw187 merged commit ad04409 into hapijs:master Jan 29, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@pavelmickevic

This comment has been minimized.

Copy link

pavelmickevic commented on 0775fa5 Feb 8, 2016

FYI: @jaw187, this decoration causes an error for Hapi 11.0.2
Error: Request interface decoration already defined: cookieAuth

This comment has been minimized.

Copy link
Contributor Author

jaw187 replied Feb 8, 2016

Tested fine for me in Hapi 11, but I dont know exactly which release that was. Send me a gist of your code, my gut feeling is that you're registering Hapi-Auth-Cookie twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.