Commit Graph

63 Commits

Author SHA1 Message Date
Screeny
928cd508ff major changes
passport.socketio now lets the user decide whether to accept a
connection or not. to do so, you have tu provide your own 'fail'-method.
this will be called unless the user is successfuly authenticated (still
uses the 'success'-method). The method will be called with four
parameters:
- data: <Object> Handshake Data
- message <String> Error-Message
- critical <Bool> True if the User is and will be unable to use
socket.io because of errors in the authorization-system or somewhere
else. False if the user would still be able to use the system (indicates
that he's just not logged-in)
- accept: <function> plain old accept function.
If there's no fail-method given, passport.socketio allows every
not-critical-failed connection.
Also there is now a 'logged_in' <Bool>-Property inside your User-Key.
2013-11-06 18:19:00 +01:00
José F. Romaniello
4b999812f1 fix missing { 2013-06-30 16:44:46 -03:00
Richard Assar
efef45309f Allow 0 value for serialized user (id) 2013-06-30 20:06:21 +01:00
José F. Romaniello
04ea36fdd3 remove connect and cookie dependency 2013-06-05 08:38:33 -03:00
Michael Robinson
012bdbeb8c Update lib/index.js
Change default cookie key.
2013-02-15 23:49:56 +13:00
Jose F. Romaniello
66dd460070 fix #6 use same parameters than express.session 2013-02-05 19:15:04 -03:00
Jose F. Romaniello
a1e46b1fbd fix bug calling both success and accept 2013-01-07 11:30:15 -03:00
Jose F. Romaniello
79878b036c refactorize to use xtend 2013-01-07 10:40:52 -03:00
Jose F. Romaniello
3dc3096b15 add basic integration tests 2012-11-16 12:43:12 -03:00
Kevin Caffrey
d8c7c0ed7d Don't pass error message on failed accepts due to not being logged in, or the client gets 500s when they should get 403s 2012-11-16 03:58:33 -05:00
Bradley Olson
f62a93c9d2 added option of success or fail callbacks. Needed to still allow users access to sockets even if they weren't logged in, but needed specific data if they were. 2012-10-26 11:13:28 -05:00
elisee
a9ea73390d Use sessionKey over hard-coded "express.sid"
The sessionKey argument was ignored and "express.sid" was always used
instead.
2012-09-09 20:31:05 +03:00
Jose F. Romaniello
678d4ccd6c initial 2012-09-05 15:14:36 -03:00