---
# Reek policy for oauth2.
#
# The remaining exclusions are intentional compatibility constraints: this gem
# preserves long-standing public API methods, OAuth2 domain names, strategy
# signatures, and test fixture shapes that would be riskier to rename or remove
# than to document here.
detectors:
  Attribute:
    exclude:
      - OAuth2::AccessToken#options
      - OAuth2::AccessToken#refresh_token
      - OAuth2::AccessToken#response
      - OAuth2::Client#connection
      - OAuth2::Client#options
      - OAuth2::Response#options
  BooleanParameter:
    exclude:
      - OAuth2::Response#initialize
  ClassVariable:
    exclude:
      - OAuth2::Response
  DataClump:
    exclude:
      - OAuth2::AccessToken
      - OAuth2::Client
  DuplicateMethodCall:
    exclude:
      - OAuth2::Client#execute_request
      - OAuth2::Client#sanitize_redirect_options
  FeatureEnvy:
    exclude:
      - OAuth2::Authenticator#apply_basic_auth
      - OAuth2::Client#build_access_token
      - OAuth2::Client#oauth_debug_logging
      - OAuth2::Client#params_to_req_opts
      - OAuth2::Client#parse_snaky_params_headers
      - OAuth2::Client#resolve_redirect_location
      - OAuth2::Strategy::Assertion#build_assertion
      - OAuth2::Strategy::AuthCode#assert_valid_params
      - OAuth2::Strategy::Implicit#assert_valid_params
  InstanceVariableAssumption:
    exclude:
      - OAuth2::AccessToken
      - OAuth2::Response
      - OAuth2::Strategy::Assertion
      - OAuth2::Strategy::AuthCode
      - OAuth2::Strategy::ClientCredentials
      - OAuth2::Strategy::Implicit
      - OAuth2::Strategy::Password
  IrresponsibleModule:
    exclude:
      - OAuth2::AccessToken
      - OAuth2::ConnectionError
      - OAuth2::TimeoutError
      - OAuth2::Strategy::Base
      - XmledString
  LongParameterList:
    exclude:
      - OAuth2::Strategy::Assertion#get_token
      - OAuth2::Strategy::Password#get_token
  ManualDispatch:
    exclude:
      - OAuth2::AccessToken#configure_authentication!
      - OAuth2::Client#build_access_token
      - OAuth2::Client#protocol_relative_redirect_location
      - OAuth2::Client#resolve_redirect_location
      - OAuth2::Error#error_message
      - OAuth2::Error#initialize
      - OAuth2::Response#parsed
      - OAuth2::Response#parser
  MissingSafeMethod:
    exclude:
      - OAuth2::AccessToken
  NilCheck:
    exclude:
      - OAuth2::AccessToken#initialize
      - OAuth2::AccessToken#revoke
      - OAuth2::Authenticator#apply_client_id
      - OAuth2::Authenticator#apply_params_auth
  SubclassedFromCoreClass:
    exclude:
      - StirredHash
      - XmledString
  TooManyInstanceVariables:
    exclude:
      - OAuth2::AccessToken
      - OAuth2::Client
  TooManyMethods:
    exclude:
      - OAuth2::AccessToken
      - OAuth2::Client
  TooManyStatements:
    exclude:
      - initialize
      - OAuth2::AccessToken#configure_authentication!
      - OAuth2::AccessToken#from_hash
      - OAuth2::AccessToken#refresh
      - OAuth2::AccessToken#revoke
      - OAuth2::Client#connection
      - OAuth2::Client#execute_request
      - OAuth2::Client#get_token
      - OAuth2::Client#params_to_req_opts
      - OAuth2::Client#parse_response
      - OAuth2::Client#parse_snaky_params_headers
      - OAuth2::Client#request
      - OAuth2::Client#sanitize_redirect_options
      - OAuth2::Error#error_message
      - OAuth2::Response#parsed
  UncommunicativeModuleName:
    exclude:
      - OAuth2
  UtilityFunction:
    exclude:
      - OAuth2::AccessToken#convert_expires_at
      - OAuth2::Client#authorization_header?
      - OAuth2::Client#cross_origin_redirect?
      - OAuth2::Client#protocol_relative_redirect_location
      - OAuth2::Client#resolve_redirect_location
      - OAuth2::Error#error_message
      - OAuth2::Strategy::Assertion#build_request
      - stubbed_client
