我不明白幾點關於如何express.js會議工作express.js理解會話安全
,當我這樣做
server.use express.cookieParser()
server.use express.cookieSession { secret: 'whatever' }
,然後設置類似
server.post '/login', (req, res)->
# checks that provided psw and username exist in db
req.session.user =
id: dbID
username: postedUsername
psw: postedPsw
res.redirect '/'
登錄序列
是req.session.user
安全,所有參數未加密?
,我應該檢查,如果用戶名和PSW是正確的,在像這樣各點:
server.use (req, res, next) ->
# checks that provided psw and username exist in db
# otherwise destroy session
?
您的時間