使用PassportJS时将用户序列化/反序列化为会话的目的? [英] Purpose of serializing/deserializing users into a session when using PassportJS?
本文介绍了使用PassportJS时将用户序列化/反序列化为会话的目的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用PassportJS时,将用户序列化/反序列化到会话中的目的是什么?我以前与JSP一起工作过,似乎对这些事情没有任何概念.
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.
推荐答案
It controls how the user instance gets saved to your session store (such as connect-redis).
我不是JSP方面的专家,但我想类必须实现某种ISerializable接口,这大概是等效的.
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.
这篇关于使用PassportJS时将用户序列化/反序列化为会话的目的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文