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.15.5 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.15.4 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.15.3 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.15.2 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.15.1 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.15.0 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.9 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.8 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.7 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.6 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.5 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.4 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.3 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.2 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.1 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.14.0 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.13.1 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.13.0 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.12.9 app/controllers/think_feel_do_engine/keep_alive_controller.rb
think_feel_do_engine-3.12.8 app/controllers/think_feel_do_engine/keep_alive_controller.rb