Sha256: 15e1f207f4ceb7123927b8a9e79d691f946a2b643400cac39a27ef45f1d22004

Contents?: true

Size: 657 Bytes

Versions: 51

Compression:

Stored size: 657 Bytes

Contents

require_dependency "think_feel_do_engine/application_controller"

module ThinkFeelDoEngine
  # Authenticate user
  class KeepAliveController < ApplicationController
    before_action :authenticated_participant_or_user?

    # GET /arms
    def index
      if @authenticated
        render nothing: true, status: :ok
      else
        render nothing: true, status: :unauthorized
      end
    end

    private

    def authenticated_participant_or_user?
      if current_user
        authenticate_user!
        @authenticated = true
      elsif current_participant
        authenticate_participant!
        @authenticated = true
      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
think_feel_do_engine-3.19.9 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.8 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.7 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.6 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.5 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.4 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.3 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.2 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.1 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.19.0 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.18.0 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.17.2 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.17.1 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.17.0 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.16.3 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.16.2 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.16.1 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.15.7 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.16.0 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.15.6 app/controllers/think_feel_do_engine/keep_alive_controller.rb