def ensure_valid_checkid_request
      self.openid_request = checkid_request
      if !openid_request.is_a?(OpenID::Server::CheckIDRequest)
        redirect_to root_path, :alert => t(:identity_verification_request_invalid)
      elsif !allow_verification?
        flash[:notice] = logged_in? && !pape_requirements_met?(auth_time) ?
          t(:service_provider_requires_reauthentication_last_login_too_long_ago) :
          t(:login_to_verify_identity)
        session[:return_to] = proceed_path
        redirect_to login_path
      end
    end
def ensure_valid_checkid_request
      self.openid_request = checkid_request
      if !openid_request.is_a?(OpenID::Server::CheckIDRequest)
        redirect_to root_path, :alert => t(:identity_verification_request_invalid)
      elsif !allow_verification?
        flash[:notice] = logged_in? && !pape_requirements_met?(auth_time) ?
          t(:service_provider_requires_reauthentication_last_login_too_long_ago) :
          t(:login_to_verify_identity)
        session[:return_to] = proceed_path
        redirect_to login_path
      end
    end
Use this as before_filter for every CheckID request based action.
 Loads the current openid request and cancels if none can be found.
 The user has to log in, if he has not verified his ownership of
 the identifier, yet.