Sha256: 5e21388408ab6cfe103f0b4f42e2080384ec25377592b80f052e0e5504b76f64

Contents?: true

Size: 260 Bytes

Versions: 1

Compression:

Stored size: 260 Bytes

Contents

require 'rack/accept'

module GDS
  module SSO
    class ApiAccess
      def self.api_call?(env)
        request = Rack::Accept::Request.new(env)
        request.best_media_type(%w{text/html application/json}) == 'application/json'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gds-sso-12.1.0 lib/gds-sso/api_access.rb