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
export lib methods #7
Comments
Yea, I was thinking the same thing, that perhaps the stuff in parse should be exported. |
Sorry about that! My cat stepped on the mouse and closed the issue! |
I was going to comment that |
@joewagner I think the thing is, we may want it to be public. So in essence, this library will create and set cookies in a certain way and people want to be able to read those cookies without actually straight-up using the middleware to read all cookies. Typically I see people using those functions for websockets, but I don't known enough about websockets to know if they are even doing the correct thing anyway (as far as I know, everyone could just be copy-pasting from everyone else). |
@dougwilson That makes sense. I hadn't though about that type of use case for this lib. |
I think having a function to parse signed cookies would be ok. Could even be a "method" of the middleware function returned when you create a cookie parser that way you don't need to keep passing in the secret. |
I like that idea, actually :) |
Actually, this library is just to "parse cookies" as a middleware. The generation of the JSON/signed cookies should be a separate module, and this module should simply be a wrapper to use that other module to parse the cookies. |
That sounds like a better idea.
|
Hi.
Upgrading a node project I noticed the function
connect.utils.parseSignedCookies
has moved tocookie-parser/lib/parse.js
assignedCookies
. I can't reach into it, because only the middleware is exported and the rest is private.Would it be an idea to put the
lib/parse.js
functions on the exported function?gr,
Tom
The text was updated successfully, but these errors were encountered: