docs: function generateAuthMsg(params) {
      var message = {
          application_id: config.creds.appId,
          auth_key: config.creds.authKey,
          nonce: Utils.randomNonce(),
          timestamp: Utils.unixTime()
      };
  
      // With user authorization
      if (params.login && params.password) {
          message.user = {login: params.login, password: params.password};
      } else if (params.email && params.password) {
          message.user = {email: params.email, password: params.password};
      } else if (params.provider) {
          // Via social networking provider (e.g. facebook, twitter etc.)
          message.provider = params.provider;
          if (params.scope) {
              message.scope = params.scope;
          }
          if (params.keys && params.keys.token) {
              message.keys = {token: params.keys.token};
          }
          if (params.keys && params.keys.secret) {
              message.keys.secret = params.keys.secret;
          }
      }
  
      return message;
  }