mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-21 09:52:06 +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.
26 lines
519 B
JavaScript
26 lines
519 B
JavaScript
module.exports = {
|
|
get authorize() {
|
|
return require('./authorize');
|
|
},
|
|
|
|
get authenticate() {
|
|
return require('./authenticate');
|
|
},
|
|
|
|
get session() {
|
|
return require('./session');
|
|
},
|
|
/*
|
|
* TODO: Get rid of these when v0.1 is gone
|
|
*/
|
|
get init() {
|
|
return (options) => {
|
|
require('./oauth').init(options);
|
|
return require('./passport').init(options);
|
|
};
|
|
},
|
|
get oauth() {
|
|
return require('./oauth');
|
|
}
|
|
};
|