Skip to content

Commit

Permalink
make session properties enumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
oberhamsi committed Nov 8, 2012
1 parent d797ca1 commit c0cb391
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions lib/middleware/session.js
Expand Up @@ -90,7 +90,8 @@ var ServletSession = exports.ServletSession = function(request) {
});
}
return data;
}
},
enumerable: true
});

/**
Expand All @@ -101,7 +102,8 @@ var ServletSession = exports.ServletSession = function(request) {
Object.defineProperty(this, "isNew", {
get: function() {
return getSession().isNew();
}
},
enumerable: true
});

/**
Expand All @@ -110,7 +112,8 @@ var ServletSession = exports.ServletSession = function(request) {
Object.defineProperty(this, "creationTime", {
get: function() {
return getSession().getCreationTime();
}
},
enumerable: true
});

/**
Expand All @@ -123,7 +126,8 @@ var ServletSession = exports.ServletSession = function(request) {
},
set: function(interval) {
return getSession().setMaxInactiveInterval(interval);
}
},
enumerable: true
});

/**
Expand All @@ -132,7 +136,8 @@ var ServletSession = exports.ServletSession = function(request) {
Object.defineProperty(this, "lastAccessedTime", {
get: function() {
return getSession().getLastAccessedTime();
}
},
enumerable: true
});

/**
Expand All @@ -157,6 +162,7 @@ var ServletSession = exports.ServletSession = function(request) {
},
set: function(value) {
getSession().setAttribute("__volatileData__", value);
}
},
enumerable: true
});
};

0 comments on commit c0cb391

Please sign in to comment.