Add feature of regeneration for #34 - #74
Conversation
Signed-off-by: Cartoon Zhang <cartoon.zhang@zeofast.com>
Signed-off-by: Cartoon Zhang <cartoon.zhang@zeofast.com>
|
Just |
|
can't we just use |
|
@dead-horse 2nd, In the semantics, ctx.session={}, as well as set(), did correct logic. But what we want to do in 'regeneration', is to regenerate a new session key/code, for avoiding hack attack. |
|
@palmtale need to add test cases for this feature |
| return this[_CONTEXT_SESSION]; | ||
| }, | ||
| }, | ||
| regenerateSession: { |
There was a problem hiding this comment.
I don't want to add too many properties in ctx, maybe we can move this method to ctx.session.regenerate(), and it should be an async function.
|
@dead-horse How about this, set signal _requireRegenerate in session, and do it in commit as the same as save. |
|
@dead-horse Any hope of getting this merged? As it is now, we cannot use this module as we need a way to regenerate the session key when we authenticate the user. As @palmtale says, setting |
|
Would be great to see this merged, also due to jaredhanson/passport#907 |
Add feature of regeneration for #34