lib/components/session.js
function(app, opts) {
  opts = opts || {};
  this.app = app;
  this.service = new SessionService(opts);

  let getFun = function(m) {
    return (function() {
          return function() {
            return self.service[m].apply(self.service, arguments);
          };
    })();
  };
  // proxy the service methods except the lifecycle interfaces of component
  let method, self = this;
  for(let m in this.service) {
    if(m !== 'start' && m !== 'stop') {
      method = this.service[m];
      if(typeof method === 'function') {
        this[m] = getFun(m);
      }
    }
  }
}
function(app, opts) {
  opts = opts || {};
  this.app = app;
  this.service = new SessionService(opts);

  let getFun = function(m) {
    return (function() {
          return function() {
            return self.service[m].apply(self.service, arguments);
          };
    })();
  };
  // proxy the service methods except the lifecycle interfaces of component
  let method, self = this;
  for(let m in this.service) {
    if(m !== 'start' && m !== 'stop') {
      method = this.service[m];
      if(typeof method === 'function') {
        this[m] = getFun(m);
      }
    }
  }
}
function ( app , opts ) { opts = opts || { } ; this . app = app ; this . service = new SessionService ( opts ) ; let getFun = function ( m ) { return ( function ( ) { return function ( ) { return self . service [ m ] . apply ( self . service , arguments ) ; } ; } ) ( ) ; } ; // proxy the service methods except the lifecycle interfaces of component let method , self = this ; for ( let m in this . service ) { if ( m !== 'start' && m !== 'stop' ) { method = this . service [ m ] ; if ( typeof method === 'function' ) { this [ m ] = getFun ( m ) ; } } } }
Session component. Manage sessions.

@param {Object} app  current application context
@param {Object} opts attach parameters
Session component . Manage sessions .