<commit_before>require_dependency 'api_auth'

module DoorkeeperSsoClient
  class ApplicationController < ::ApplicationController
    before_filter :api_authenticate

    protect_from_forgery with: :null_session

  protected
    def api_authenticate
      api_key = ::ApiAuth.access_id(request)
      if ::DoorkeeperSsoClient::Config.oauth_client_id == api_key && ::ApiAuth.authentic?(request, ::DoorkeeperSsoClient::Config.oauth_client_secret)
        return true
      else
        head :forbidden
        return false
      end
    end
  end
end
<commit_msg>Run callback independent of application controller<commit_after>require_dependency 'api_auth'

module DoorkeeperSsoClient
  class ApplicationController < ActionController::Base
    before_filter :api_authenticate

    protect_from_forgery with: :null_session

  protected
    def api_authenticate
      api_key = ::ApiAuth.access_id(request)
      if ::DoorkeeperSsoClient::Config.oauth_client_id == api_key && ::ApiAuth.authentic?(request, ::DoorkeeperSsoClient::Config.oauth_client_secret)
        return true
      else
        head :forbidden
        return false
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.06747404844290658, 'fraction_numerical': 0.0, 'mean_word_length': 3.9444444444444446, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '827643', 'n_tokens_mistral': 341, 'n_tokens_neox': 332, 'n_words': 71}