code: function process_signin_request(request, h) {
      return new Promise((resolve, reject) => {
          dbMgr
              .findOne(app_config.get("app:db_collections:user_account"), {
                  "username": request.payload.username,
                  "password": auth_util.encrypt_password(request.payload.password)
              })
              .then((account) => {
                  /**
               * In this demo implementaion, the sessin cookie is set up without
               * encryption!!!
               *
               * A production implementaion must set the session state to
               * reflect signed in state.
               *
               */
  
                  if (account) {
                      var expire_on = moment().add(6, "months");
                      var session = {
                          username: request.payload.username,
                          expire_on: expire_on.format()
                      };
                      request
                          .cookieAuth
                          .set(session);
  
                      return resolve(account._id.toString());
                  } else {
                      return reject(new Error("Account not found."));
                  }
              }, (err) => {
                  reject(err);
              });
      });
  }
docs: This is a demo implementaion of the process_signin_request() function
  that is required for the hapi-openid-connect plugin.  The implementaion must
  perform the following:
  
  
  1- verify that the username (email) and password match a user account record
  2- if the user account is found, set the session cookie for the request if
  not already set.
  3- return a Promise that must resolve with the user account ID (string)
  
  The user profile must have a unique attirbute named _id, that has a toString()
  method, and it must be less than 255 characters (as per OpenID specs).
  
  
  @param  {[type]} username [description]
  @param  {[type]} password [description]
  @return {[type]}          [description]