2016-05-06 04:52:36 +00:00
|
|
|
// Copyright IBM Corp. 2015,2016. All Rights Reserved.
|
|
|
|
// Node module: loopback-boot
|
|
|
|
// This file is licensed under the MIT License.
|
|
|
|
// License text available at https://opensource.org/licenses/MIT
|
|
|
|
|
2017-05-08 21:48:48 +00:00
|
|
|
'use strict';
|
|
|
|
|
2015-01-01 09:57:09 +00:00
|
|
|
var framework = {
|
|
|
|
initialize: function(passport) {
|
|
|
|
return function(req, res, next) {
|
|
|
|
req._passport = passport;
|
|
|
|
res.setHeader('passport', 'initialized');
|
|
|
|
next();
|
|
|
|
};
|
2016-03-31 11:29:39 +00:00
|
|
|
},
|
2015-01-01 09:57:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
var Passport = function() {
|
|
|
|
this._framework = framework;
|
|
|
|
};
|
|
|
|
|
|
|
|
Passport.prototype.initialize = function() {
|
|
|
|
return this._framework.initialize(this);
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = new Passport();
|