docs: def GetOobResult(self, param, user_ip, gitkit_token=None):
      """Gets out-of-band code for ResetPassword/ChangeEmail request.
  
      Args:
        param: dict of HTTP POST params
        user_ip: string, end user's IP address
        gitkit_token: string, the gitkit token if user logged in
  
      Returns:
        A dict of {
          email: user email who initializes the request
          new_email: the requested new email, for ChangeEmail action only
          oob_link: the generated link to be send to user's email
          oob_code: the one time out-of-band code
          action: OobAction
          response_body: the http body to be returned to Gitkit widget
        }
      """
      if 'action' in param:
        try:
          if param['action'] == GitkitClient.RESET_PASSWORD_ACTION:
            request = self._PasswordResetRequest(param, user_ip)
            oob_code, oob_link = self._BuildOobLink(request,
                                                    param['action'])
            return {
                'action': GitkitClient.RESET_PASSWORD_ACTION,
                'email': param['email'],
                'oob_link': oob_link,
                'oob_code': oob_code,
                'response_body': simplejson.dumps({'success': True})
            }
          elif param['action'] == GitkitClient.CHANGE_EMAIL_ACTION:
            if not gitkit_token:
              return self._FailureOobResponse('login is required')
            request = self._ChangeEmailRequest(param, user_ip, gitkit_token)
            oob_code, oob_link = self._BuildOobLink(request,
                                                    param['action'])
            return {
                'action': GitkitClient.CHANGE_EMAIL_ACTION,
                'email': param['oldEmail'],
                'new_email': param['newEmail'],
                'oob_link': oob_link,
                'oob_code': oob_code,
                'response_body': simplejson.dumps({'success': True})
            }
        except errors.GitkitClientError as error:
          return self._FailureOobResponse(error.value)
      return self._FailureOobResponse('unknown request type')