-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 227 - allow custom session id generation (#252)
This commit address [issue 227](#227) allowing an implementation of genid to be used when a custom session store is used. This is fully compatibile with the existing implementation and aligns with how expression-session allows for overriding the way session ids are generated. Note because of how session ids are generated in this library, it is not possible to simply fall into the custom store's genid function. In implementing these changes, the following was done: - Moved the default session id generation into config to make it clear what said default is - Added a new parameter genid compatible with how it works for express-session - Updated the appsession code to take advantage of the provided value and fallback to the default. - Added unit tests validating the genid parameter being used when specified and not having any effect on the encrypted cookie implementation. - Reordered the spread operators in the appsession custom store tests so that overrides are respected. This changed no other existing tests. - Updated documentation with the additional, optional parameter along with links to the compatabile usage in express-session. Co-authored-by: Adam Mcgrath <adam.mcgrath@auth0.com>
- Loading branch information
1 parent
0f434fb
commit fc5fcb7
Showing
6 changed files
with
119 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters