Purpose of serializing/deserializing users into a session when using PassportJS?

别来无恙 提交于 2020-01-02 10:20:32

问题


What is the purpose of serializing/deserializing users into the session when using PassportJS? I worked with JSP before and there seems to be no notion of these things.


回答1:


It controls how the user instance gets saved to your session store (such as connect-redis).

I'm no expert on JSP, but I imagine there's some sort of ISerializable interface that classes must implement, which would be a rough equivalent.



来源:https://stackoverflow.com/questions/18640117/purpose-of-serializing-deserializing-users-into-a-session-when-using-passportjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!