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

Cookie support expansion pack #62

Merged
merged 13 commits into from
Jul 20, 2015
Merged

Conversation

nelsonic
Copy link
Member

Optional Support for passing in JWT as Cookie as discussed in: #55 and #56
usage of Cookies is 100% Optional and _Fully Backward Compatible_ with code previously written using hapi-auth-jwt2.

the new code in lib/index.js enables people to send their JWT to hapi.js web servers as a cookie in the format:

[ 'token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ2YWxpZCI6dHJ1ZSwiaWQiOiJjYTVhNGQyYy01ZTFhLTRhMmYtODVlMy1hNDU1YWM0YTY1ZmMiLCJleHAiOjE0MzcyODcxODM5MTIsImlhdCI6MTQzNzI4NTM4M30.XvLf4uHNcGo4MojsUHeJ9IHsT44gl_cS606SyBOpMtU; 
Max-Age=31536000; Expires=Mon, 18 Jul 2016 05:56:23 GMT; Secure; HttpOnly' ]

Furthermore this plugin will interoperate with https:/hapijs/hapi-auth-cookie (or any other plugins people are using)

nelsonic added a commit to dwyl/hapi-auth-jwt2-cookie-example that referenced this pull request Jul 19, 2015
benjaminlees added a commit that referenced this pull request Jul 20, 2015
@benjaminlees benjaminlees merged commit 227d932 into master Jul 20, 2015
@benjaminlees benjaminlees deleted the cookie-support-expansion-pack branch July 20, 2015 15:36
@nelsonic
Copy link
Member Author

Thanks for reviewing & merging the PR @benjaminlees 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants