ad_manager_api/lib/ad_manager_api/credential_handler.rb
def validate_headers_for_server(credentials)
      application_name = credentials[:application_name]
      if (application_name.nil? or application_name.empty? or
          application_name.include?(DEFAULT_APPLICATION_NAME) or
          application_name.include?(LEGACY_DEFAULT_APPLICATION_NAME))
        raise AdsCommon::Errors::AuthError, (
            'Application name must be specified and cannot be the default')
      end
      return nil
    end
def validate_headers_for_server(credentials)
      application_name = credentials[:application_name]
      if (application_name.nil? or application_name.empty? or
          application_name.include?(DEFAULT_APPLICATION_NAME) or
          application_name.include?(LEGACY_DEFAULT_APPLICATION_NAME))
        raise AdsCommon::Errors::AuthError, (
            'Application name must be specified and cannot be the default')
      end
      return nil
    end
def validate_headers_for_server ( credentials ) application_name = credentials [ :application_name ] if ( application_name . nil? or application_name . empty? or application_name . include? ( DEFAULT_APPLICATION_NAME ) or application_name . include? ( LEGACY_DEFAULT_APPLICATION_NAME ) ) raise AdsCommon :: Errors :: AuthError , ( 'Application name must be specified and cannot be the default' ) end return nil end
Validates that the right credentials are being used for the chosen
 environment.
Validates that the right credentials are being used for the chosen environment .