code: function Strategy(options, verify) {
      if (typeof options == 'function') {
          verify = options;
          options = {};
      }
  
      if (!verify) throw new Error('userapp authentication strategy requires a verify function');
      if (!options.appId) throw new Error('userapp strategy requires an app id');
  
      this._appId = options.appId;
      this._usernameField = options.usernameField || 'username';
      this._passwordField = options.passwordField || 'password';
      this._sessionCookie = options.sessionCookie || 'ua_session_token';
      this._realm = options.realm || 'Users';
  
      passport.Strategy.call(this);
      this.name = 'userapp';
      this._verify = verify;
  
      // Initialize UserApp
      UserApp.initialize({ appId: this._appId });
  }
docs: `Strategy` constructor.
  
  The local authentication strategy authenticates requests based on the
  credentials submitted through an HTML-based login form, or using a
  session token sent as a cookie.
  
  Applications must supply a `verify` callback which accepts `username` and
  `password` credentials, and then calls the `done` callback supplying a
  `user`, which should be set to `false` if the credentials are not valid.
  If an exception occured, `err` should be set.
  
  Optionally, `options` can be used to change the fields in which the
  credentials are found.
  
  Options:
  - `usernameField`  field name where the username is found, defaults to _username_
  - `passwordField`  field name where the password is found, defaults to _password_
  - `sessionCookie`  cookie name where the session token is found, defaults to _ua_session_token_
  - `appId`          the UserApp App Id to connect to
  
  Examples:
  
  passport.use(new LocalStrategy(
  function(username, password, done) {
  User.findOne({ username: username, password: password }, function (err, user) {
  done(err, user);
  });
  }
  ));
  
  @param {Object} options
  @param {Function} verify
  @api public