def proceed
      identity = identifier(current_account)
      if @site = current_account.sites.find_by_url(checkid_request.trust_root)
        resp = checkid_request.answer(true, nil, identity)
        resp = add_sreg(resp, @site.sreg_properties) if sreg_request
        resp = add_ax(resp, @site.ax_properties) if ax_fetch_request
        resp = add_pape(resp, auth_policies, auth_level, auth_time)
        render_response(resp)
      elsif checkid_request.immediate && (sreg_request || ax_store_request || ax_fetch_request)
        render_response(checkid_request.answer(false))
      elsif checkid_request.immediate
        render_response(checkid_request.answer(true, nil, identity))
      else
        redirect_to decide_path
      end
    end
def proceed
      identity = identifier(current_account)
      if @site = current_account.sites.find_by_url(checkid_request.trust_root)
        resp = checkid_request.answer(true, nil, identity)
        resp = add_sreg(resp, @site.sreg_properties) if sreg_request
        resp = add_ax(resp, @site.ax_properties) if ax_fetch_request
        resp = add_pape(resp, auth_policies, auth_level, auth_time)
        render_response(resp)
      elsif checkid_request.immediate && (sreg_request || ax_store_request || ax_fetch_request)
        render_response(checkid_request.answer(false))
      elsif checkid_request.immediate
        render_response(checkid_request.answer(true, nil, identity))
      else
        redirect_to decide_path
      end
    end
This action decides how to process the current request and serves as
 dispatcher and re-entry in case the request could not be processed
 directly (for instance if the user had to log in first).
 When the user has already trusted the relying party, the request will
 be answered based on the users release policy. If the request is immediate
 (relying party wants no user interaction, used e.g. for ajax requests)
 the request can only be answered if no further information (like simple
 registration data) is requested. Otherwise the user will be redirected
 to the decision page.