mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
cb0c5dc582
refs #9865 * This service handles the session store and exporting middleware to be used for creating and managing sessions * Updates the auth service index.js file in line with how we do things elsewhere * After wrapping the exports in a getter, the usage of rewire had broken the authenticate tests, this commit _removes_ rewire from the tests, calls `init` on the models before the tests (needed because rewire isn't there) and also cleans up the use of var.
24 lines
624 B
JavaScript
24 lines
624 B
JavaScript
module.exports = {
|
|
get getSession() {
|
|
return require('./middleware').getSession;
|
|
},
|
|
get cookieCsrfProtection() {
|
|
return require('./middleware').cookieCsrfProtection;
|
|
},
|
|
get safeGetSession() {
|
|
return require('./middleware').safeGetSession;
|
|
},
|
|
get createSession() {
|
|
return require('./middleware').createSession;
|
|
},
|
|
get destroySession() {
|
|
return require('./middleware').destroySession;
|
|
},
|
|
get getUser() {
|
|
return require('./middleware').getUser;
|
|
},
|
|
get ensureUser() {
|
|
return require('./middleware').ensureUser;
|
|
}
|
|
};
|