Sha256: 5c41974b528238a1c002012dd705b9663abb325e79226ed1267c7dac720d887b

Contents?: true

Size: 707 Bytes

Versions: 9

Compression:

Stored size: 707 Bytes

Contents

module Sso
  # class ApplicationController < RocketPants::Base
  #   extend Apipie::DSL::Controller
  class ApplicationController < ::ApplicationController
    # include ::Doorkeeper::Helpers::Controller

    # TODO: Security issue?
    protect_from_forgery
    # Bug in devise so we skip protect_from_forgery for only create
    # http://stackoverflow.com/questions/20875591/actioncontrollerinvalidauthenticitytoken-in-registrationscontrollercreate
    # http://stackoverflow.com/questions/23773730/rails-4-skipping-protect-from-forgery-for-api-actions
    # skip_before_action :verify_authenticity_token, if: :json_request?

 protected

    def json_request?
      request.format.json?
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
doorkeeper_sso-0.4.9 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.4.8 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.4.6 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.4.3 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.4.1 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.4.0 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.2.7 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.2.6 app/controllers/sso/application_controller.rb
doorkeeper_sso-0.2.5 app/controllers/sso/application_controller.rb