lib/github/ldap.rb
def configure_membership_validation_strategy(strategy = nil)
      @membership_validator =
        case strategy.to_s
        when "classic"
          GitHub::Ldap::MembershipValidators::Classic
        when "recursive"
          GitHub::Ldap::MembershipValidators::Recursive
        when "active_directory"
          GitHub::Ldap::MembershipValidators::ActiveDirectory
        else
          # fallback to detection, defaulting to recursive strategy
          if active_directory_capability?
            GitHub::Ldap::MembershipValidators::ActiveDirectory
          else
            GitHub::Ldap::MembershipValidators::Recursive
          end
        end
    end
def configure_membership_validation_strategy(strategy = nil)
      @membership_validator =
        case strategy.to_s
        when "classic"
          GitHub::Ldap::MembershipValidators::Classic
        when "recursive"
          GitHub::Ldap::MembershipValidators::Recursive
        when "active_directory"
          GitHub::Ldap::MembershipValidators::ActiveDirectory
        else
          # fallback to detection, defaulting to recursive strategy
          if active_directory_capability?
            GitHub::Ldap::MembershipValidators::ActiveDirectory
          else
            GitHub::Ldap::MembershipValidators::Recursive
          end
        end
    end
Internal: Configure the membership validation strategy.

 If no known strategy is provided, detects ActiveDirectory capabilities or
 falls back to the Recursive strategy by default.

 Returns the membership validator strategy Class.