2016-09-30 14:45:59 +03:00
|
|
|
var passport = require('./passport'),
|
|
|
|
authorize = require('./authorize'),
|
|
|
|
authenticate = require('./authenticate'),
|
2017-02-23 21:04:24 +03:00
|
|
|
sync = require('./sync'),
|
|
|
|
oauth = require('./oauth'),
|
2017-03-02 22:50:58 +03:00
|
|
|
validation = require('./validation'),
|
2017-02-23 21:04:24 +03:00
|
|
|
ghostAuth = require('./ghost-auth');
|
2016-09-30 14:45:59 +03:00
|
|
|
|
|
|
|
exports.init = function (options) {
|
2017-02-23 21:04:24 +03:00
|
|
|
oauth.init(options);
|
|
|
|
sync.init(options);
|
2016-09-30 14:45:59 +03:00
|
|
|
|
|
|
|
return passport.init(options)
|
|
|
|
.then(function (response) {
|
|
|
|
return {auth: response.passport};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2017-03-02 22:50:58 +03:00
|
|
|
exports.validation = validation;
|
2016-09-30 14:45:59 +03:00
|
|
|
exports.oauth = oauth;
|
|
|
|
exports.authorize = authorize;
|
|
|
|
exports.authenticate = authenticate;
|
2017-02-23 21:04:24 +03:00
|
|
|
exports.ghostAuth = ghostAuth;
|