code: function (elem)
      {
          if (elem.getAttribute("type") == "result") {
              this.authenticated = true;
              this._changeConnectStatus(Strophe.Status.CONNECTED, null);
          } else if (elem.getAttribute("type") == "error") {
              Strophe.info("Session creation failed.");
              this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
              return false;
          }
  
          return false;
      }
docs: PrivateFunction: _sasl_session_cb
  _Private_ handler to finish successful SASL connection.
  
  This sets Connection.authenticated to true on success, which
  starts the processing of user handlers.
  
  Parameters:
  (XMLElement) elem - The matching stanza.
  
  Returns:
  false to remove the handler.