pass
@param {String} passport
@param {Function} callback
@param {Function} errback
518481
function pass(passport, callback, errback) {
    if (equal(passport)) {
      return callback && callback();
    }
    return errback && errback();
  }
58562
function initAuth (req, res, next) {
  const params = {
    session: false,
    state: state.serialize(req),
    scope: req.authProvider.scope
  };

  // noinspection JSUnresolvedFunction
  passport.authenticate(
    req.params.provider,
    params
  )(req, res, next);
}
290316
function(err, res) {
    if (_.isFunction(callback)) {
      try {
        res = callback(err, res);
        err = null;
      } catch(e) {
        err = e;
      }
    }
    if (err) {
      deferred.reject(err);
    } else {
      deferred.resolve(res);
    }
  }
840522
function oauth2callback(options) {
  return function(req, res, next) {
    const { service_name, } = options;
    const entitytype = req.session.passport.user.entitytype || 'user';
    const redirectURL = (entitytype === 'account') ? passportExtSettings.redirect.account.logged_in_homepage : passportExtSettings.redirect.user.logged_in_homepage;
    const loginEntityURL = (entitytype === 'account') ? passportLocals.paths.account_auth_login : passportLocals.paths.user_auth_login;
    const loginUrl = (req.session.return_url) ?
      req.session.return_url :
      redirectURL;
    const loginFailureUrl = (req.session.return_url) ?
      req.session.return_url :
      loginEntityURL + '?return_url=' + req.session.return_url;
    // console.log({ loginUrl, loginFailureUrl, redirectURL, loginEntityURL, });
    // console.log({ entitytype, redirectURL, loginEntityURL, loginUrl, loginFailureUrl }, 'req.session', req.session, 'req.user', req.user,'req.headers', req.headers,{service_name});
    passport.authenticate(`oauth2client-${service_name}`, {
      successRedirect: loginUrl,
      failureRedirect: loginFailureUrl,
      failureFlash: `Invalid ${service_name} authentication credentials username or password.`,
    })(req, res, next);
  };
}
630929
function(callback) {
        var self = this;
        var guid = guidFor(this);

        Ember.$(window).on('hashchange.ember-location-'+guid, function() {
          run(function() {
            var path = self.getURL();
            if (get(self, 'lastSetURL') === path) { return; }

            set(self, 'lastSetURL', null);

            callback(path);
          });
        });
      }
1091943
function (uses, payload, message, callback) {
        executeMiddlewares(uses, payload, message, function (newPayload) {
            callback.apply(undefined, [newPayload]);
        });
    }
1046450
public void sendAsync(final MailRequestCallback callback) {
        if (!configuration.mailSendFilter().filter(this)) return;
        prepareSend();
        request()
                .async()
                .post(entity(),
                      new InvocationCallback<javax.ws.rs.core.Response>() {
                          @Override
                          public void completed(javax.ws.rs.core.Response o) {
                              callback.completed(new Response(o));
                          }

                          @Override
                          public void failed(Throwable throwable) {
                              callback.failed(throwable);
                          }
                      });
    }
795707
function(req, res) {
      var url = passport.config.loginRedirect || '/profile';
      var statusCode = 302; //303 is more accurate but express redirect() defaults
      //to 302 so stick to that for consistency
      if (req.session && req.session.returnTo) {
        if (req.session.returnToMethod == req.method) {
          statusCode = 307;
        }
        if (req.query.h && req.session.returnTo.indexOf('#') == -1) {
          url = req.session.returnTo + '#' + req.query.h;
        } else {
          url = req.session.returnTo;
        }
        delete req.session.returnTo;
      }
      return res.redirect(statusCode, url);
    }
1030567
function (callback) {
		callbacks.fail.push(function () {
			var result = callback.apply(this, arguments);
			if (result) {
				failMessage(result);
			}
		});
		return execute;
	}
1228492
function (args, callback) {
        ternserver.request({
            query: {
              type: "fixes", //$NON-NLS-1$
              file: args.meta.location,
              problemId: args.problemId,
              annotation: args.annotation,
              annotations: args.annotations
            },
            files: args.files
          },
          function (error, fixes) {
            if (error) {
              callback({request: 'fixes', error: error.message, message: Messages['failedToComputeFixes']}); //$NON-NLS-1$
            } else if (fixes && Array.isArray(fixes)) {
              callback({request: 'fixes', fixes: fixes}); //$NON-NLS-1$
            } else {
              callback({request: 'fixes', fixes: []}); //$NON-NLS-1$
            }
          }
        );
      }
884199
function doLogin(req, user, callback) {
	req.logIn(user, function(err) {
		if (err) {
			logger.error(err);
			return callback(err);
		}
		user.login_timestamp = Date.now();
		fileUtil.getMetastoreSafe(req).then(function(store) {
			store.updateUser(user.username, user, function(err) {
				if (err) {
					logger.error(err);
					return callback(err);
				}
				callback(null);
			});
		}, function noMetastore(err) {
			callback(err);
		});
	});
}
105510
function handleErr_(errback, json) {
  if (errback && json && json.error) {
    errback(json.error);
  }
}
817836
function (evt, callback) {
    var self = this;
    var callbacked = false;

    function handleError (err) {
      debug(err);
      callbacked = true;
      callback(err);
    }

    try {
      if (this.transformFn.length === 2) {
        this.transformFn(_.cloneDeep(evt), function (err, newEvt) {
          if (err) return handleError(err);
          callbacked = true;
          callback(null, newEvt);
        });
      } else {
        var newEvt = this.transformFn(_.cloneDeep(evt));
        callback(null, newEvt);
      }
    } catch (err) {
      if (!callbacked) {
        return handleError(err);
      }
      throw err;
    }
  }
337912
function(callback){
			var self = this;
			if(!this.id){
				return process.nextTick(function(){
					callback(new Error("Invalid session ID"));
				});
			}

			options.client.get(options.keyspace + self.id, function(error, resp){
				if(error)
					return callback(error);
				try{
					resp = JSON.parse(resp);
				}catch(e){
					return callback(e);
				}
				extendSession(self, resp);
				callback();
			});
		}
1106461
function (migrationName, scope, callback) {
    var executeCreateMigration = load('create-migration');
    if (typeof scope === 'function') {
      callback = scope;
    } else if (scope) {
      this.internals.migrationMode = scope;
      this.internals.matching = scope;
    }

    this.internals.argv._.push(migrationName);
    return Promise.fromCallback(
      function (callback) {
        executeCreateMigration(this.internals, this.config, callback);
      }.bind(this)
    ).asCallback(callback);
  }
480834
function(err){
			if(!err){
				var address = app[serverNS].address();

				if(config.port){
					app.info('Server online at %s:%s', address.address, address.port);
				}else if(config.file){
					app.info('Server online via %s', config.file);
				}else{
					app.info('Server online!');
				}
			}
			app.emit('app.register', 'express');
			return callback(err);
		}
256543
function (err, data) {
		if (err) {
			LOG.warn(err.toString());
		}
		else {
			for (var server in data.accounts) {
				LOG.warn('local server: ' + server);

				var user_list = data.accounts[server];
				for (var uid in user_list) {
					var token = user_list[uid];
					LOG.warn('local uid: ' + uid + ' token: ' + token);
					l_send_remote_login(server, uid, token);	
				}
			}
		}
	}